Factor out polkit
This commit is contained in:
parent
bc315d4785
commit
2dc5e60d16
|
@ -0,0 +1,21 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
hyprland = config.nathan.programs.hyprland.enable;
|
||||
targets = config.nathan.config.desktop.targets;
|
||||
in lib.mkif hyprland {
|
||||
home.packages = with pkgs; [ libsForQt5.polkit-kde-agent ];
|
||||
# Setup polkit as a service
|
||||
systemd.user.services.polkit-kde = {
|
||||
Unit = {
|
||||
Description = "Polkit kde authentication agent";
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart =
|
||||
"${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install = { WantedBy = targets; };
|
||||
};
|
||||
}
|
|
@ -41,8 +41,6 @@ in with lib; {
|
|||
inputs.self.packages.${pkgs.system}.pyprland
|
||||
# For fancy x11 scaling
|
||||
sommelier
|
||||
# Polkit
|
||||
libsForQt5.polkit-kde-agent
|
||||
# Auto workspace renaming
|
||||
inputs.self.packages.${pkgs.system}.hyprland-autoname-workspaces
|
||||
];
|
||||
|
@ -256,20 +254,6 @@ in with lib; {
|
|||
#########################
|
||||
## Hyprland Addons
|
||||
#########################
|
||||
# Setup polkit as a service
|
||||
systemd.user.services.polkit-kde = {
|
||||
Unit = {
|
||||
Description = "Polkit kde authentication agent";
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart =
|
||||
"${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install = { WantedBy = [ "hyprland-session.target" ]; };
|
||||
};
|
||||
# Setup swayosd as a service
|
||||
systemd.user.services.swayosd = {
|
||||
Unit = {
|
||||
|
|
Loading…
Reference in New Issue