polkit: The rule file needs to end in .rules
Otherwise it's ignored.
This commit is contained in:
parent
678bcc6d4d
commit
1ce709ee00
@ -58,18 +58,15 @@ in
|
|||||||
# The polkit daemon reads action/rule files
|
# The polkit daemon reads action/rule files
|
||||||
environment.pathsToLink = [ "/share/polkit-1" ];
|
environment.pathsToLink = [ "/share/polkit-1" ];
|
||||||
|
|
||||||
# PolKit rules for NixOS
|
# PolKit rules for NixOS.
|
||||||
environment.etc = [ {
|
environment.etc."polkit-1/rules.d/10-nixos.rules".text =
|
||||||
source = pkgs.writeText "10-nixos.conf"
|
''
|
||||||
''
|
polkit.addAdminRule(function(action, subject) {
|
||||||
polkit.addAdminRule(function(action, subject) {
|
return ["${cfg.adminIdentities}"];
|
||||||
return ["${cfg.adminIdentities}"];
|
});
|
||||||
});
|
|
||||||
|
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
''; #TODO: validation on compilation (at least against typos)
|
''; #TODO: validation on compilation (at least against typos)
|
||||||
target = "polkit-1/rules.d/10-nixos.conf";
|
|
||||||
} ];
|
|
||||||
|
|
||||||
services.dbus.packages = [ pkgs.polkit ];
|
services.dbus.packages = [ pkgs.polkit ];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user