push
This commit is contained in:
1
main.nix
1
main.nix
@@ -16,6 +16,7 @@
|
|||||||
./modules/searxng.nix
|
./modules/searxng.nix
|
||||||
./modules/cloudflared.nix
|
./modules/cloudflared.nix
|
||||||
./modules/invidious.nix
|
./modules/invidious.nix
|
||||||
|
./modules/glances.nix
|
||||||
|
|
||||||
({ pkgs, ... }: {
|
({ pkgs, ... }: {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|||||||
@@ -1,44 +1,44 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.glances
|
pkgs.glances
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users.glances = {
|
users.users.glances = {
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
group = "glances";
|
group = "glances";
|
||||||
home = "/var/lib/glances";
|
home = "/var/lib/glances";
|
||||||
createHome = true;
|
createHome = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
users.groups.glances = {};
|
users.groups.glances = {};
|
||||||
|
|
||||||
systemd.services.glances-web = {
|
systemd.services.glances-web = {
|
||||||
description = "glances web interface";
|
description = "glances web interface";
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "glances";
|
User = "glances";
|
||||||
Group = "glances";
|
Group = "glances";
|
||||||
|
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${pkgs.glances}/bin/glances \
|
${pkgs.glances}/bin/glances \
|
||||||
-w \
|
-w \
|
||||||
-p 61208 \
|
-p 61208 \
|
||||||
-B 0.0.0.0
|
-B 0.0.0.0
|
||||||
'';
|
'';
|
||||||
|
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = 5;
|
RestartSec = 5;
|
||||||
|
|
||||||
NoNewPrivileges = true;
|
NoNewPrivileges = true;
|
||||||
PrivateTmp = true;
|
PrivateTmp = true;
|
||||||
ProtectSystem = "strict";
|
ProtectSystem = "strict";
|
||||||
ProtectHome = true;
|
ProtectHome = true;
|
||||||
LockPersonality = true;
|
LockPersonality = true;
|
||||||
MemoryDenyWriteExecute = true;
|
MemoryDenyWriteExecute = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user