many changes this one forgot
This commit is contained in:
parent
67c2117563
commit
44307a3f6f
22 changed files with 1081 additions and 437 deletions
32
modules/desktop/mate-polkit.nix
Normal file
32
modules/desktop/mate-polkit.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue