nix-configs/modules/presets/common.nix
2025-07-29 03:02:25 +02:00

27 lines
631 B
Nix

{
pkgs,
config,
lib,
...
}:
let
cfg = config.xyno.common;
in
{
options.xyno.common.enable = lib.mkEnableOption "enables common settings";
config = lib.mkIf cfg.enable {
boot.initrd.systemd.enable = true;
hardware.keyboard.zsa.enable = true;
programs.nh.enable = true;
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) { // make run0 keep pw for some time (tm)
if (
subject.isInGroup("wheel")
&& action.id == "org.freedesktop.systemd1.manage-units"
) {
return polkit.Result.AUTH_ADMIN_KEEP;
}
});
'';
};
}