mirror of
https://git.sr.ht/~neverness/ultima
synced 2025-01-04 11:23:52 +00:00
27 lines
660 B
Nix
27 lines
660 B
Nix
{ pkgs, lib, config, True, ... }:
|
|
|
|
with lib;
|
|
|
|
let cfg = config.module.services.polkit;
|
|
in {
|
|
options = { module.services.polkit = { enable = mkEnableOption ""; }; };
|
|
|
|
config = mkIf cfg.enable {
|
|
security.polkit = True;
|
|
environment.systemPackages = [ pkgs.soteria ];
|
|
systemd.user.services.polkit-soteria = {
|
|
wantedBy = [ "graphical-session.target" ];
|
|
wants = [ "graphical-session.target" ];
|
|
after = [ "graphical-session.target" ];
|
|
script = lib.getExe pkgs.soteria;
|
|
serviceConfig = {
|
|
Type = "simple";
|
|
Restart = "on-failure";
|
|
RestartSec = 1;
|
|
TimeoutStopSec = 10;
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|