mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 06:14:26 +03:00
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".
This commit is contained in:
parent
1ce709ee00
commit
7ea47df0a4
@ -33,9 +33,9 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
security.polkit.adminIdentities = mkOption {
|
security.polkit.adminIdentities = mkOption {
|
||||||
type = types.str;
|
type = types.listOf types.str;
|
||||||
default = "unix-user:0;unix-group:wheel";
|
default = [ "unix-user:0" "unix-group:wheel" ];
|
||||||
example = "";
|
example = [ "unix-user:alice" "unix-group:admin" ];
|
||||||
description =
|
description =
|
||||||
''
|
''
|
||||||
Specifies which users are considered “administrators”, for those
|
Specifies which users are considered “administrators”, for those
|
||||||
@ -62,7 +62,7 @@ in
|
|||||||
environment.etc."polkit-1/rules.d/10-nixos.rules".text =
|
environment.etc."polkit-1/rules.d/10-nixos.rules".text =
|
||||||
''
|
''
|
||||||
polkit.addAdminRule(function(action, subject) {
|
polkit.addAdminRule(function(action, subject) {
|
||||||
return ["${cfg.adminIdentities}"];
|
return [${concatStringsSep ", " (map (i: "\"${i}\"") cfg.adminIdentities)}];
|
||||||
});
|
});
|
||||||
|
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
|
Loading…
Reference in New Issue
Block a user