From 914b76bad421f403807a2065b669a77f6803e406 Mon Sep 17 00:00:00 2001 From: Benno Fünfstück Date: Mon, 22 Dec 2014 11:20:19 +0000 Subject: services.mpd: use systemd's user option For some reason, mpd fails to open the sound card if using mpd's user option. Starting mpd directly as the mpd user works for me. --- nixos/modules/services/audio/mpd.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nixos') diff --git a/nixos/modules/services/audio/mpd.nix b/nixos/modules/services/audio/mpd.nix index e6b525c4b1ba..eab7993387de 100644 --- a/nixos/modules/services/audio/mpd.nix +++ b/nixos/modules/services/audio/mpd.nix @@ -15,7 +15,6 @@ let state_file "${cfg.dataDir}/state" sticker_file "${cfg.dataDir}/sticker.sql" log_file "syslog" - user "mpd" ${if cfg.network.host != "any" then "bind_to_address ${cfg.network.host}" else ""} ${if cfg.network.port != 6600 then @@ -99,6 +98,9 @@ in { path = [ pkgs.mpd ]; preStart = "mkdir -p ${cfg.dataDir} && chown -R mpd:mpd ${cfg.dataDir}"; script = "exec mpd --no-daemon ${mpdConf}"; + serviceConfig = { + User = "mpd"; + }; }; users.extraUsers.mpd = { -- cgit 1.4.1