Skip to content

Commit 5771999

Browse files
committed
nix: small fixups
1 parent a6b1b85 commit 5771999

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

flake.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
nodes.machine = {
8787
imports = [ self.nixosModules.default ];
8888
security.polkit.persistentAuthentication = true;
89-
security.run0-sudo-shim = true;
89+
security.run0-sudo-shim.enable = true;
9090

9191
users.users = {
9292
admin = {
@@ -126,16 +126,17 @@
126126
{
127127
options.security = {
128128
polkit.persistentAuthentication = lib.mkEnableOption "patch polkit to allow persistent authentication and add rules";
129-
run0-sudo-shim = lib.mkEnableOption "enable run0-sudo-shim instead of sudo";
129+
run0-sudo-shim.enable = lib.mkEnableOption "enable run0-sudo-shim instead of sudo";
130130
};
131131

132132
config = lib.mkMerge [
133133
{
134134
nixpkgs.overlays = [ self.overlays.default ];
135135
}
136-
(lib.mkIf config.security.run0-sudo-shim {
136+
(lib.mkIf config.security.run0-sudo-shim.enable {
137137
environment.systemPackages = [ pkgs.run0-sudo-shim ];
138138
security.sudo.enable = false;
139+
security.polkit.enable = true;
139140
})
140141
(lib.mkIf config.security.polkit.persistentAuthentication {
141142
security.polkit.extraConfig = ''

0 commit comments

Comments
 (0)