mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-22 00:20:58 +00:00
nixos/anubis: make all instances part of a system slice
Helps with resource management, and just makes things a bit cleaner and more idiomatic, since generally slices are used to manage groups of related processes
This commit is contained in:
@@ -374,6 +374,10 @@ in
|
||||
anubis = { };
|
||||
};
|
||||
|
||||
systemd.slices.system-anubis = {
|
||||
description = "Anubis AI Firewall System Slice";
|
||||
documentation = [ "https://anubis.techaro.lol" ];
|
||||
};
|
||||
systemd.services = lib.mapAttrs' (
|
||||
name: instance:
|
||||
lib.nameValuePair "${instanceName name}" {
|
||||
@@ -396,6 +400,7 @@ in
|
||||
);
|
||||
|
||||
serviceConfig = {
|
||||
Slice = "system-anubis.slice";
|
||||
User = instance.user;
|
||||
Group = instance.group;
|
||||
DynamicUser = true;
|
||||
|
||||
Reference in New Issue
Block a user