gui: Fix polkit syntax error

Somehow the ECMAscript compatibility was downgraded.
This commit is contained in:
Simon Bruder 2022-12-11 16:22:23 +01:00
parent 5d98924ea1
commit 3cfb7b1d32
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -37,7 +37,7 @@ lib.mkIf config.sbruder.gui.enable {
security.polkit.extraConfig = lib.optionalString config.sbruder.full '' security.polkit.extraConfig = lib.optionalString config.sbruder.full ''
// Potential security problem, but required because there is no graphical polkit authentication agent // Potential security problem, but required because there is no graphical polkit authentication agent
polkit.addRule((action, subject) => { polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.policykit.exec" && action.lookup("program") == "${config.services.input-remapper.package}/bin/input-remapper-control" && subject.isInGroup("users")) { if (action.id == "org.freedesktop.policykit.exec" && action.lookup("program") == "${config.services.input-remapper.package}/bin/input-remapper-control" && subject.isInGroup("users")) {
return polkit.Result.YES; return polkit.Result.YES;
} }