diff options
author | Peter Hoeg <peter@speartail.com> | 2017-01-09 20:47:33 +0800 |
---|---|---|
committer | Franz Pletz <fpletz@fnordicwalking.de> | 2017-01-09 13:47:33 +0100 |
commit | f1b8c3b1190fdf213b8944e8963d1623b432b9ac (patch) | |
tree | 209c14eed3199ee932257392c1483cdc2de1ee0c /nixos/modules/config/pulseaudio.nix | |
parent | 87e1c492989f1d1a48e74935cd3c2637e67364ed (diff) | |
download | nixpkgs-f1b8c3b1190fdf213b8944e8963d1623b432b9ac.tar nixpkgs-f1b8c3b1190fdf213b8944e8963d1623b432b9ac.tar.gz nixpkgs-f1b8c3b1190fdf213b8944e8963d1623b432b9ac.tar.bz2 nixpkgs-f1b8c3b1190fdf213b8944e8963d1623b432b9ac.tar.lz nixpkgs-f1b8c3b1190fdf213b8944e8963d1623b432b9ac.tar.xz nixpkgs-f1b8c3b1190fdf213b8944e8963d1623b432b9ac.tar.zst nixpkgs-f1b8c3b1190fdf213b8944e8963d1623b432b9ac.zip |
pulseaudio nixos module: use the units provided by upstream (#21633)
I have left in 2 NixOS custom config directives, so the configuration should be the same with the only change in behaviour being that the service is not eagerly loaded but in fact only socket activated, which it should be.
Diffstat (limited to 'nixos/modules/config/pulseaudio.nix')
-rw-r--r-- | nixos/modules/config/pulseaudio.nix | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/nixos/modules/config/pulseaudio.nix b/nixos/modules/config/pulseaudio.nix index 06ce5200420..742167fbf69 100644 --- a/nixos/modules/config/pulseaudio.nix +++ b/nixos/modules/config/pulseaudio.nix @@ -212,6 +212,7 @@ in { # Allow PulseAudio to get realtime priority using rtkit. security.rtkit.enable = true; + systemd.packages = [ cfg.package ]; }) (mkIf hasZeroconf { @@ -227,31 +228,14 @@ in { target = "pulse/default.pa"; source = myConfigFile; }; - systemd.user = { services.pulseaudio = { - description = "PulseAudio Server"; - # NixOS doesn't support "Also" so we bring it in manually - wantedBy = [ "default.target" ]; serviceConfig = { - Type = "notify"; - ExecStart = binaryNoDaemon; - Restart = "on-failure"; RestartSec = "500ms"; }; environment = { DISPLAY = ":${toString config.services.xserver.display}"; }; restartIfChanged = true; }; - - sockets.pulseaudio = { - description = "PulseAudio Socket"; - wantedBy = [ "sockets.target" ]; - socketConfig = { - Priority = 6; - Backlog = 5; - ListenStream = "%t/pulse/native"; - }; - }; }; }) |