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
|
inputs.self.packages.${pkgs.system}.pyprland
|
||||||
# For fancy x11 scaling
|
# For fancy x11 scaling
|
||||||
sommelier
|
sommelier
|
||||||
# Polkit
|
|
||||||
libsForQt5.polkit-kde-agent
|
|
||||||
# Auto workspace renaming
|
# Auto workspace renaming
|
||||||
inputs.self.packages.${pkgs.system}.hyprland-autoname-workspaces
|
inputs.self.packages.${pkgs.system}.hyprland-autoname-workspaces
|
||||||
];
|
];
|
||||||
|
@ -256,20 +254,6 @@ in with lib; {
|
||||||
#########################
|
#########################
|
||||||
## Hyprland Addons
|
## 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
|
# Setup swayosd as a service
|
||||||
systemd.user.services.swayosd = {
|
systemd.user.services.swayosd = {
|
||||||
Unit = {
|
Unit = {
|
||||||
|
|
Loading…
Reference in New Issue