nixos/netbox: put all services into a systemd slice

Simplifies resource overview and management.
This commit is contained in:
Martin Weinelt
2026-07-07 17:43:38 +02:00
parent 06a84e0888
commit 53e8dc133a
@@ -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