nixos/sudo: Guard against security.sudo.package = pkgs.sudo-rs;

This is not unlikely to happen, given the enthusiasm shown by some users,
but we are not there yet, and this will save them from breaking their system.
This commit is contained in:
nicoo 2023-08-31 10:02:14 +00:00 committed by Yt
parent a6616e7d71
commit 10b6e8ba21

View file

@ -192,6 +192,10 @@ in
###### implementation
config = mkIf cfg.enable {
assertions = [
{ assertion = cfg.package.pname != "sudo-rs";
message = "The NixOS `sudo` module does not work with `sudo-rs` yet."; }
];
# We `mkOrder 600` so that the default rule shows up first, but there is
# still enough room for a user to `mkBefore` it.