diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 6046083..b71a483 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -8,9 +8,9 @@ ./locale.nix ./printing.nix ./themeing.nix + ./polkit-fix.nix ]; services.flatpak.enable = true; - security.polkit.enable = true; services.illum.enable = true; services.upower.enable = true; diff --git a/modules/desktop/polkit-fix.nix b/modules/desktop/polkit-fix.nix new file mode 100644 index 0000000..44c2b8b --- /dev/null +++ b/modules/desktop/polkit-fix.nix @@ -0,0 +1,22 @@ +{ pkgs, ... }: +{ + # idk why but without this, polkit does't work + # letting sand think was a fucking mistake + security.polkit.enable = true; + systemd.user.services.niri-flake-polkit.enable = false; + + # stolen from https://nixos.wiki/wiki/Polkit on 2025-09-22T17 + 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; + }; + }; +}