nixos: system: add polkit
One nice thing is that it enables the prompts when using `systemctl`, instead of requiring `sudo`.
This commit is contained in:
parent
f23e6251ce
commit
9ddd59eac8
|
@ -10,6 +10,7 @@
|
|||
./nix
|
||||
./packages
|
||||
./podman
|
||||
./polkit
|
||||
./printing
|
||||
./users
|
||||
];
|
||||
|
|
16
modules/nixos/system/polkit/default.nix
Normal file
16
modules/nixos/system/polkit/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Polkit settings
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.system.polkit;
|
||||
in
|
||||
{
|
||||
options.my.system.polkit = with lib; {
|
||||
enable = my.mkDisableOption "polkit configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
security.polkit = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue