nixos/nix-daemon: Enable cgroups delegation (#339310)
When `use-cgroups` is enabled, the nix daemon creates sub-cgroups for the build processes (and itself if NixOS/nix#11412 is merged, see NixOS/nix#9675). `Delegate` should be set to prevent systemd from messing with the nix service's cgroups (https://github.com/systemd/systemd/blob/main/docs/CGROUP_DELEGATION.md) and ensure the OOM killer only targets the offending derivation and not the entire service (NixOS/nix#10374).
This commit is contained in:
parent
7f23fcdf9b
commit
c960ba48d1
@ -198,6 +198,7 @@ in
|
||||
IOSchedulingClass = cfg.daemonIOSchedClass;
|
||||
IOSchedulingPriority = cfg.daemonIOSchedPriority;
|
||||
LimitNOFILE = 1048576;
|
||||
Delegate = "yes";
|
||||
};
|
||||
|
||||
restartTriggers = [ config.environment.etc."nix/nix.conf".source ];
|
||||
|
Loading…
Reference in New Issue
Block a user