🌐
NixOS Wiki
wiki.nixos.org › wiki › Polkit
Polkit - Official NixOS Wiki
February 19, 2026 - Polkit is used for controlling system-wide privileges. It provides an organized way for non-privileged processes to communicate with privileged ones. In contrast to sudo, it does not grant root permission to an entire process, but rather allows a finer level of control of centralized system policy.
🌐
NixOS Wiki
nixos.wiki › wiki › Polkit
Polkit - NixOS Wiki
Polkit is used for controlling system-wide privileges. It provides an organized way for non-privileged processes to communicate with privileged ones.
Discussions

Polkit
You might want to read up what Nix actually is and how it works because it does not do things the conventional way. The Nix and NixOS manuals are great places to start. If you've enabled the xserver, polkit should already be enabled. Try pkexec whoami. More on reddit.com
🌐 r/NixOS
9
3
August 28, 2022
Polkit is not working anymore - NixOS Discourse
hey! i have tried to make polkit work and it worked for a time, and it is not working anymore IDK why. my nixos configuration - # Polkit systemd = { user.services.polkit-gnome-authentication-agent-1 = { description = "polkit-gnome-authentication-agent-1"; wantedBy = [ "graphical-session.target" ... More on discourse.nixos.org
🌐 discourse.nixos.org
1
August 26, 2023
Setting Up Authentication Manager (Polkit)
Idk if that's it, but why do you haves pkgs.gnome, if you have with pkgs before ? And when I start Hyprland ( my use case ) I added these exec-once = polkit-agent-helper-1 exec-once = systemctl start --user polkit-gnome-authentication-agent-1 More on reddit.com
🌐 r/NixOS
6
3
January 29, 2024
Sway WM configuration: Polkit, login manager
I am trying to configure Polkit on Sway, no success. Also, I want to get some login manager to work with Sway, GDM and SDDM do not detect sway. Do I have to configure SDDM somehow to make it see Sway? More on discourse.nixos.org
🌐 discourse.nixos.org
0
0
August 28, 2019
🌐
GitHub
github.com › NixOS › nixpkgs › blob › master › nixos › modules › security › polkit.nix
nixpkgs/nixos/modules/security/polkit.nix at master · NixOS/nixpkgs
config.environment.etc."polkit-1/rules.d/10-nixos.rules".source · ]; systemd.services.polkit.stopIfChanged = false; · systemd.sockets."polkit-agent-helper".wantedBy = [ "sockets.target" ]; · # The polkit daemon reads action/rule files ·
Author   NixOS
🌐
NixOS
search.nixos.org › packages
Packages - polkit
Search through thousands of packages, NixOS configuration options, and flakes available in the Nix ecosystem.
🌐
Reddit
reddit.com › r/nixos › polkit
r/NixOS on Reddit: Polkit
August 28, 2022 -

Hi again guys I'm having trouble to add a polkit to nixos with? I'm using Qtile and according to the wiki I need to autostart it cause I'm using a wm but after intalling the mate-polkit I don't know where the location of the binary is ... also do you have any recommendations to get more familiar with nix? cause sometimes the wiki is not enough ... anyways thanks in advance

EDIT: I know that normally the polkit binary should be under the /usr/lib directory but for some reason it doesn't exists on my system maybe I overlooked something?

🌐
NixOS Discourse
discourse.nixos.org › t › polkit-is-not-working-anymore › 32225
Polkit is not working anymore - NixOS Discourse
August 26, 2023 - hey! i have tried to make polkit work and it worked for a time, and it is not working anymore IDK why. my nixos configuration - # Polkit 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.polk...
🌐
Windswept
docs.windswept.digital › nixos › polkit
Setting up Polkit NixOS | WindSwept Docs
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; }; }; };
🌐
Reddit
reddit.com › r/nixos › setting up authentication manager (polkit)
r/NixOS on Reddit: Setting Up Authentication Manager (Polkit)
January 29, 2024 -

Hi!

After one year of Arch, i decided to switch to this distro. And wow, it is as cool as different. I'm having many problems, but i would like to start by a simple one: Setting up the Authentication manager.

I've followed the instruction of the wiki, and some youtube videos, and i have the following configuration:

...
environment.systemPackages = with pkgs; [
     ...
     # Polkit
     pkgs.polkit
     pkgs.polkit_gnome
     ...
  ];

security.polkit.enable = true;

  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;
      };
  };
   extraConfig = ''
     DefaultTimeoutStopSec=10s
   '';
};
...

From what i understand, this would make the gnome authentication manager work. But, it doesn't. I honestly can't understand why

I hope some of you has already passed through this problem, and knows the solution.

Thanks in advance

🌐
NixOS Discourse
discourse.nixos.org › help
Sway WM configuration: Polkit, login manager - Help - NixOS Discourse
August 28, 2019 - I am trying to configure Polkit on Sway, no success. Also, I want to get some login manager to work with Sway, GDM and SDDM do not detect sway. Do I have to configure SDDM somehow to make it see Sway?
Find elsewhere
🌐
NixOS
search.nixos.org › options
Options - security.polkit.extraConfig
Search through thousands of packages, NixOS configuration options, and flakes available in the Nix ecosystem.
🌐
NixOS
search.nixos.org › options
Options - polkit
Search through thousands of packages, NixOS configuration options, and flakes available in the Nix ecosystem.
🌐
NixOS Discourse
discourse.nixos.org › t › polkit-is-not-working-anymore › 32225
Polkit is not working anymore - Page 2 - NixOS Discourse
August 29, 2023 - hey! i have tried to make polkit work and it worked for a time, and it is not working anymore IDK why. my nixos configuration - # Polkit systemd = { user.services.polkit-gnome-authentication-agent-1 = { …
🌐
NixOS Discourse
discourse.nixos.org › help
Polkit configuration being ignored - Help - NixOS Discourse
April 13, 2024 - I’m on unstable. I am trying to allow my USB redirection to work in either gnome-boxes or virt-manager. I’m getting an error in virt-manager “Error setting USB device node ACL: Error setting facl: Operation not permitted” Relevant sections of my config are below: security.polkit.enable ...
🌐
GitHub
github.com › NixOS › nixos › blob › master › modules › security › polkit.nix
nixos/modules/security/polkit.nix at master · NixOS/nixos
OBSOLETE (go to NixOS/nixpkgs) - NixOS, a Linux distribution based on the Nix package manager - OBSOLETE (go to NixOS/nixpkgs) - nixos/modules/security/polkit.nix at master · NixOS/nixos
Author   NixOS
🌐
MyNixOS
mynixos.com › nixpkgs › option › security.polkit.extraConfig
security.polkit.extraConfig - MyNixOS
*/ polkit.addRule(function(action, subject) { // Make sure to set { security.polkit.debug = true; } in configuration.nix polkit.log("user " + subject.user + " is attempting action " + action.id + " from PID " + subject.pid); }); /* Allow any local user to do anything (dangerous!).
🌐
Reddit
reddit.com › r/nixos › struggling with polkit + authentication agent
r/NixOS on Reddit: Struggling with polkit + authentication agent
November 10, 2024 -

Hey guys, I am trying to get polkit and the polkit KDE athentication agent running on my system but I am having a pretty hard time getting it working. Here are the polkit relevant sections of my setup

# /etc/nixos/configuration.nix
environment.systemPackages = with pkgs; [
  pkgs.polkit
];
security.polkit.enable = true;

# ~/dotfiles/home,nix
home.packages = [
pkgs.kdePackages.polkit-kde-agent-1
];

# ~/dotfiles/qtile/autostart
/nix/store/$(ls -la /nix/store | grep polkit-kde-agent | grep '^d' | awk '{print $9}')/libexec/polkit-kde-authentication-agent-1 &

I tried to get this to be as close to the polkit + authentication agent setup described on the wiki as possible. The Qtile autostart command is copied directly from the official wiki page for polkit. But I am still having authentication problems. For example, when I open /etc/nixos/configuration.nix in Kate, I do not get a prompt asking for the administrator password when I try to save, but instead I still get this error:

Does anyone have any experience with getting polkit and the KDE authentication agent working properly? Have I done something obviously wrong here? Am I missing something?

🌐
NixOS
search.nixos.org › packages
NixOS Search - Packages - security.polkit.extraConfig
Search through thousands of packages, NixOS configuration options, and flakes available in the Nix ecosystem.
🌐
MyNixOS
mynixos.com › nixpkgs › package › polkit
polkit - MyNixOS
Nix package polkit declared in nixpkgs. Toolkit for defining and handling the policy that allows unprivileged processes to speak to privil….