mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 02:44:30 +00:00
nixos/confinement: add conflict for ProtectSystem service option
Systemd ProtectSystem is incompatible with the chroot we make for confinement. The options is redundant with what we do anyway so warn if it had been set and advise to disable it. Merges: https://github.com/NixOS/nixpkgs/pull/87420
This commit is contained in:
parent
5da1393030
commit
4c81174f4c
@ -160,6 +160,11 @@ in {
|
||||
+ " the 'users.users' option instead as this combination is"
|
||||
+ " currently not supported.";
|
||||
}
|
||||
{ assertion = !cfg.serviceConfig.ProtectSystem or false;
|
||||
message = "${whatOpt "ProtectSystem"}. ProtectSystem is not compatible"
|
||||
+ " with service confinement as it fails to remount /usr within"
|
||||
+ " our chroot. Please disable the option.";
|
||||
}
|
||||
]) config.systemd.services);
|
||||
|
||||
config.systemd.packages = lib.concatLists (lib.mapAttrsToList (name: cfg: let
|
||||
|
Loading…
Reference in New Issue
Block a user