push
This commit is contained in:
1
main.nix
1
main.nix
@@ -16,6 +16,7 @@
|
||||
./modules/searxng.nix
|
||||
./modules/cloudflared.nix
|
||||
./modules/invidious.nix
|
||||
./modules/glances.nix
|
||||
|
||||
({ pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.glances
|
||||
];
|
||||
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;
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user