Polkit : Switch agent to KDE.

This commit is contained in:
Dmitry Voronin 2024-03-30 04:23:29 +03:00
parent d43b8641df
commit b13f1cf15f
3 changed files with 27 additions and 4 deletions

View file

@ -8,6 +8,7 @@
./desktop/Portal.nix
./desktop/Realtime.nix
./desktop/Sound.nix
./desktop/Systemd.nix
];

View file

@ -1,6 +1,19 @@
{ pkgs, ... }: {
{ pkgs, lib, ... }: {
security.polkit.enable = true;
environment.systemPackages = with pkgs; [
polkit_gnome
];
systemd = {
packages = with pkgs; [
polkit-kde-agent
];
user = {
services.plasma-polkit-agent = {
serviceConfig = {
Restart = "always";
RestartSec = 2;
Slice = "session.slice";
};
environment.PATH = lib.mkForce null;
wantedBy = [ "gui-session.target" ];
};
};
};
}

View file

@ -0,0 +1,9 @@
{ ... }: {
systemd.user.targets.gui-session = {
after = [ "graphical-session-pre.target" ];
bindsTo = [ "graphical-session.target" ];
description = "GUI session.";
documentation = [ "man:systemd.special(7)" ];
wants = [ "graphical-session-pre.target" ];
};
}