many changes this one forgot

This commit is contained in:
Lucy Hochkamp 2025-04-04 18:42:10 +02:00
parent 67c2117563
commit 44307a3f6f
No known key found for this signature in database
22 changed files with 1081 additions and 437 deletions

View file

@ -0,0 +1,32 @@
{
pkgs,
config,
lib,
...
}:
let
cfg = config.xyno.desktop.mate-polkit;
in
{
options.xyno.desktop.mate-polkit.enable = lib.mkEnableOption "enable mate-polkit as the gui polkit thing";
options.xyno.desktop.mate-polkit.wantedBy = lib.mkOption {
type = lib.types.str;
default = "niri.service";
};
options.xyno.desktop.mate-polkit.package = lib.mkOption {
type = lib.types.package;
default = pkgs.mate.mate-polkit; # we're using mate polkit as it seems to be the only maintained gtk polkit thing (and we're using all the other gtk shit anyways)
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
systemd.user.services.mate-polkit = {
unitConfig.PartOf = "graphical-session.target";
unitConfig.After = "graphical-session.target";
unitConfig.Requisite = "graphical-session.target";
serviceConfig.Restart = "on-failure";
wantedBy = [ cfg.wantedBy ];
script = "${cfg.package}/libexec/polkit-mate-authentication-agent-1";
};
};
}