nixpkgs/modules/security/policy-kit.nix
Eelco Dolstra 7ab616f659 * Added support for ConsoleKit.
* Let ConsoleKit track the current logins instead of pam_console.
  Udev now takes care of setting the device permissions to the active
  user.  This works much better, since pam_console wouldn't apply
  permissions to new (hot-plugged) devices.  Also, the udev+ConsoleKit
  approach supports user switching.  (We don't have that for X yet,
  but it already works for logins on virtual consoles: if you switch
  between different users on differents VCs with Alt+Fn, the device
  ownership will be changed automatically.)

svn path=/nixos/trunk/; revision=16743
2009-08-17 01:16:38 +00:00

25 lines
401 B
Nix

{ config, pkgs, ... }:
with pkgs.lib;
{
config = {
environment.systemPackages = [ pkgs.policy_kit ];
services.dbus.packages = [ pkgs.policy_kit ];
security.pam.services = [ { name = "polkit-1"; } ];
security.setuidPrograms = [ "pkexec" ];
system.activationScripts.policyKit = pkgs.stringsWithDeps.noDepEntry
''
mkdir -p /var/lib/polkit-1
'';
};
}