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:
Bruno BELANYI 2023-12-14 11:08:15 +00:00
parent f23e6251ce
commit 9ddd59eac8
2 changed files with 17 additions and 0 deletions

View file

@ -10,6 +10,7 @@
./nix
./packages
./podman
./polkit
./printing
./users
];

View 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;
};
};
}