Adds gnome polkit for hyprland

This commit is contained in:
willemml 2024-02-15 23:16:04 -08:00
parent 435479730a
commit 14b0f8f3a8
Signed by: willemml
GPG key ID: C3DE5DF6198DACBD
3 changed files with 30 additions and 1 deletions

24
nixos/modules/polkit.nix Normal file
View file

@ -0,0 +1,24 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
polkit_gnome
];
systemd = {
user.services.polkit-gnome-authentication-agent-1 = {
description = "polkit-gnome-authentication-agent-1";
wantedBy = ["graphical-session.target"];
wants = ["graphical-session.target"];
after = ["graphical-session.target"];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
};
nvironment.sessionVariables = {
POLKIT_AUTH_AGENT = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
};
}

View file

@ -7,6 +7,8 @@
inherit (lib) lists strings;
floating-apps = [
"UTM"
"Screen Sharing"
"System Settings"
"Software Update"
"Kodi"

View file

@ -3,7 +3,10 @@
pkgs,
...
}: {
imports = [./gui.nix];
imports = [
./gui.nix
../modules/polkit.nix
];
programs.hyprland.enable = true;
programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.hyprland;