mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2026-01-19 09:29:13 +01:00
16 lines
355 B
Nix
16 lines
355 B
Nix
{ config, lib, ... }:
|
|
let
|
|
cfg = config.security.polkit;
|
|
in
|
|
{
|
|
security.polkit.enable = true;
|
|
|
|
environment.etc."polkit-1/rules.d/9-nixos-overrides.rules".text = lib.mkIf cfg.enable ''
|
|
polkit.addAdminRule(function(action, subject) {
|
|
if(subject.isInGroup("wheel")) {
|
|
return ["unix-user:"+subject.user];
|
|
}
|
|
});
|
|
'';
|
|
}
|