From 7ea47df0a4b2154f9a1a46a0c7d105805bfbde3a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 18 Nov 2013 17:45:31 +0100 Subject: polkit: Fix authenticating as a wheel user In Javascript-based PolKit, "unix-user:0;unix-group:wheel" is not valid; it should be a list "unix-user:0", "unix-group:wheel". --- nixos/modules/security/polkit.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nixos/modules/security') diff --git a/nixos/modules/security/polkit.nix b/nixos/modules/security/polkit.nix index 614e10cd8f36..e81a4d95f05c 100644 --- a/nixos/modules/security/polkit.nix +++ b/nixos/modules/security/polkit.nix @@ -33,9 +33,9 @@ in }; security.polkit.adminIdentities = mkOption { - type = types.str; - default = "unix-user:0;unix-group:wheel"; - example = ""; + type = types.listOf types.str; + default = [ "unix-user:0" "unix-group:wheel" ]; + example = [ "unix-user:alice" "unix-group:admin" ]; description = '' Specifies which users are considered “administrators”, for those @@ -62,7 +62,7 @@ in environment.etc."polkit-1/rules.d/10-nixos.rules".text = '' polkit.addAdminRule(function(action, subject) { - return ["${cfg.adminIdentities}"]; + return [${concatStringsSep ", " (map (i: "\"${i}\"") cfg.adminIdentities)}]; }); ${cfg.extraConfig} -- cgit 1.4.1