diff --git a/flake.nix b/flake.nix index 1b3692b..42f84b5 100644 --- a/flake.nix +++ b/flake.nix @@ -76,7 +76,6 @@ ./fonts.nix ./hosts/hephaestus.nix ./common-packages.nix - ./services/netdata/default.nix ./upgrade-diff.nix determinate.nixosModules.default home-manager.nixosModules.home-manager diff --git a/hosts/hephaestus.nix b/hosts/hephaestus.nix index 4ebf228..37585c8 100644 --- a/hosts/hephaestus.nix +++ b/hosts/hephaestus.nix @@ -97,7 +97,6 @@ in iputils libation mission-center - netdata nfs-utils onlyoffice-desktopeditors opensnitch-ui diff --git a/services/netdata/default.nix b/services/netdata/default.nix deleted file mode 100644 index e1d084f..0000000 --- a/services/netdata/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ pkgs, ... }: -let - netdata = pkgs.netdata; - netdataConf = ./netdata.conf; - netdataDir = "/var/lib/netdata"; -in -{ - users.extraGroups.netdata.gid = 220008; - users.users.netdata.group = "netdata"; - users.extraUsers.netdata = { - description = "Netdata server user"; - isSystemUser = true; - name = "netdata"; - uid = 200008; - }; - systemd.services.netdata = { - wantedBy = [ "multi-user.target" ]; - after = [ "network.target" ]; - preStart = '' - mkdir -p ${netdataDir}/config - mkdir -p ${netdataDir}/logs - cp -r ${netdata}/share/netdata/web ${netdataDir}/web - chmod -R 700 ${netdataDir} - chown -R netdata:netdata ${netdataDir} - ''; - serviceConfig = { - Type = "forking"; - ExecStart = "${netdata}/bin/netdata -c ${netdataConf} -u netdata"; - Restart = "on-failure"; - }; - }; - - services.nginx.httpConfig = '' - server { - server_name netdata.thume.net; - location / { - proxy_set_header Host $http_host; - proxy_redirect off; - proxy_pass http://127.0.0.1:19999; - } - } - ''; -} diff --git a/services/netdata/netdata.conf b/services/netdata/netdata.conf deleted file mode 100644 index e2797fd..0000000 --- a/services/netdata/netdata.conf +++ /dev/null @@ -1,21 +0,0 @@ -[global] - run as user = netdata - - config directory = /var/lib/netdata/config - web files directory = /var/lib/netdata/web - cache directory = /var/lib/netdata - log directory = /var/lib/netdata/logs - - # the default database size - 1 hour - history = 3600 - - # some defaults to run netdata with least priority - process scheduling policy = idle - OOM score = 1000 - -[web] - # web files owner = root - web files group = netdata - - # by default do not expose the netdata port - bind to = localhost