nixos/netbox: put all services into a systemd slice
Simplifies resource overview and management.
This commit is contained in:
@@ -538,6 +538,10 @@ in
|
||||
|
||||
environment.systemPackages = [ netboxManageScript ];
|
||||
|
||||
systemd.slices.system-netbox = {
|
||||
description = "Netbox DCIM/IPAM";
|
||||
};
|
||||
|
||||
systemd.targets.netbox = {
|
||||
description = "Target for all NetBox services";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
@@ -562,6 +566,7 @@ in
|
||||
StateDirectoryMode = "0750";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 30;
|
||||
Slice = "system-netbox.slice";
|
||||
EnvironmentFile = cfg.environmentFiles;
|
||||
};
|
||||
in
|
||||
|
||||
Reference in New Issue
Block a user