mirror of
https://github.com/davegallant/nix-config
synced 2025-08-05 18:53:39 +00:00
Remove netdata
This commit is contained in:
@@ -76,7 +76,6 @@
|
|||||||
./fonts.nix
|
./fonts.nix
|
||||||
./hosts/hephaestus.nix
|
./hosts/hephaestus.nix
|
||||||
./common-packages.nix
|
./common-packages.nix
|
||||||
./services/netdata/default.nix
|
|
||||||
./upgrade-diff.nix
|
./upgrade-diff.nix
|
||||||
determinate.nixosModules.default
|
determinate.nixosModules.default
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
|
@@ -97,7 +97,6 @@ in
|
|||||||
iputils
|
iputils
|
||||||
libation
|
libation
|
||||||
mission-center
|
mission-center
|
||||||
netdata
|
|
||||||
nfs-utils
|
nfs-utils
|
||||||
onlyoffice-desktopeditors
|
onlyoffice-desktopeditors
|
||||||
opensnitch-ui
|
opensnitch-ui
|
||||||
|
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
}
|
|
@@ -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
|
|
Reference in New Issue
Block a user