push
This commit is contained in:
@@ -20,6 +20,7 @@ in
|
|||||||
"search.bug.tools" = "http://127.0.0.1:8888";
|
"search.bug.tools" = "http://127.0.0.1:8888";
|
||||||
"files.bug.tools" = "http://127.0.0.1:3210";
|
"files.bug.tools" = "http://127.0.0.1:3210";
|
||||||
"tube.bug.tools" = "http://127.0.0.1:3030";
|
"tube.bug.tools" = "http://127.0.0.1:3030";
|
||||||
|
"monitor.bug.tools" = "http://127.0.0.1:61208";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
44
modules/glances.nix
Normal file
44
modules/glances.nix
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.glances
|
||||||
|
];
|
||||||
|
|
||||||
|
users.users.glances = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "glances";
|
||||||
|
home = "/var/lib/glances";
|
||||||
|
createHome = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.groups.glances = {};
|
||||||
|
|
||||||
|
systemd.services.glances-web = {
|
||||||
|
description = "glances web interface";
|
||||||
|
after = [ "network-online.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
User = "glances";
|
||||||
|
Group = "glances";
|
||||||
|
|
||||||
|
ExecStart = ''
|
||||||
|
${pkgs.glances}/bin/glances \
|
||||||
|
-w \
|
||||||
|
-p 61208 \
|
||||||
|
-B 0.0.0.0
|
||||||
|
'';
|
||||||
|
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = 5;
|
||||||
|
|
||||||
|
NoNewPrivileges = true;
|
||||||
|
PrivateTmp = true;
|
||||||
|
ProtectSystem = "strict";
|
||||||
|
ProtectHome = true;
|
||||||
|
LockPersonality = true;
|
||||||
|
MemoryDenyWriteExecute = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
# open the netdata port
|
|
||||||
networking.firewall.allowedTCPPorts = [ 19999 ];
|
|
||||||
|
|
||||||
services.netdata = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
# small example config mapped to netdata.conf sections
|
|
||||||
config = {
|
|
||||||
global = {
|
|
||||||
"memory mode" = "ram"; # keep in memory for speed
|
|
||||||
"debug log" = "none";
|
|
||||||
};
|
|
||||||
|
|
||||||
web = {
|
|
||||||
# bind the dashboard to all interfaces (or set to "127.0.0.1:19999" for local-only)
|
|
||||||
"bind to" = "0.0.0.0:19999";
|
|
||||||
};
|
|
||||||
|
|
||||||
# enable go.d nvidia_smi collector (Netdata reads go.d configs)
|
|
||||||
"go.d" = {
|
|
||||||
nvidia_smi = {
|
|
||||||
enabled = "yes"; # note: Netdata expects string values matching netdata.conf keys
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user