9 cfg = config.security.soteria;
12 options.security.soteria = {
13 enable = lib.mkEnableOption null // {
15 Whether to enable Soteria, a Polkit authentication agent
16 for any desktop environment.
19 You should only enable this if you are on a Desktop Environment that
20 does not provide a graphical polkit authentication agent, or you are on
21 a standalone window manager or Wayland compositor.
25 package = lib.mkPackageOption pkgs "soteria" { };
28 config = lib.mkIf cfg.enable {
29 security.polkit.enable = true;
30 environment.systemPackages = [ cfg.package ];
32 systemd.user.services.polkit-soteria = {
33 description = "Soteria, Polkit authentication agent for any desktop environment";
35 wantedBy = [ "graphical-session.target" ];
36 wants = [ "graphical-session.target" ];
37 after = [ "graphical-session.target" ];
39 script = lib.getExe cfg.package;
42 Restart = "on-failure";
49 meta.maintainers = with lib.maintainers; [ johnrtitor ];