diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2011-07-26 14:14:10 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2011-07-26 14:14:10 +0000 |
commit | 645205b6001176dd88ee4aaaa0cf0e2378f1f971 (patch) | |
tree | 5ce19df38eed0ab9ff9556b01ed0a6857768ec8d /modules/security | |
parent | 2aaff3aa067e9cca8537de6ded6bfb11165c3b4e (diff) | |
download | nixpkgs-645205b6001176dd88ee4aaaa0cf0e2378f1f971.tar nixpkgs-645205b6001176dd88ee4aaaa0cf0e2378f1f971.tar.gz nixpkgs-645205b6001176dd88ee4aaaa0cf0e2378f1f971.tar.bz2 nixpkgs-645205b6001176dd88ee4aaaa0cf0e2378f1f971.tar.lz nixpkgs-645205b6001176dd88ee4aaaa0cf0e2378f1f971.tar.xz nixpkgs-645205b6001176dd88ee4aaaa0cf0e2378f1f971.tar.zst nixpkgs-645205b6001176dd88ee4aaaa0cf0e2378f1f971.zip |
* Add a module for rtkit. The PulseAudio module enables rtkit to
acquire real-time priority. svn path=/nixos/trunk/; revision=27963
Diffstat (limited to 'modules/security')
-rw-r--r-- | modules/security/rtkit.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/modules/security/rtkit.nix b/modules/security/rtkit.nix new file mode 100644 index 00000000000..060ff87f9ea --- /dev/null +++ b/modules/security/rtkit.nix @@ -0,0 +1,39 @@ +# A module for ‘rtkit’, a DBus system service that hands out realtime +# scheduling priority to processes that ask for it. + +{ config, pkgs, ... }: + +with pkgs.lib; + +{ + + options = { + + security.rtkit.enable = mkOption { + default = false; + description = '' + Whether to enable the RealtimeKit system service, which hands + out realtime scheduling priority to user processes on + demand. For example, the PulseAudio server uses this to + acquire realtime priority. + ''; + }; + + }; + + + config = mkIf config.security.rtkit.enable { + + environment.systemPackages = [ pkgs.rtkit ]; + + services.dbus.packages = [ pkgs.rtkit ]; + + users.extraUsers = singleton + { name = "rtkit"; + uid = config.ids.uids.rtkit; + description = "RealtimeKit daemon"; + }; + + }; + +} |