From c46ce2a94b14b386d70debadfee008bcc82b9424 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 7 Jun 2015 15:05:46 +0200 Subject: mpd service --- bragi.nix | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'bragi.nix') diff --git a/bragi.nix b/bragi.nix index ba127f1c..da7c6d6d 100644 --- a/bragi.nix +++ b/bragi.nix @@ -25,6 +25,8 @@ in { allowPing = true; allowedUDPPortRanges = [ { from = 60000; to = 61000; } # mosh-server ]; + allowedTCPPorts = [ 6600 # MPD + ]; }; environment.systemPackages = with pkgs; [ @@ -58,6 +60,26 @@ in { ''; }; + systemd.services.jack = { + wantedBy = [ "sound.target" ]; + serviceConfig = { + Type = "simple"; + ExecStart = "${jack2}/bin/jackd -d alsa -M -H -r 96000"; + }; + }; + + services.mpd = { + enable = true; + musicDirectory = "/media/odin/music"; + extraConfig = '' + audio_output { + name "JACK" + type "jack" + client_name "mpd" + } + ''; + }; + users.extraUsers.guest = { name = "gkleen"; isNormalUser = true; @@ -80,12 +102,4 @@ in { { domain = "@audio"; item = "nofile"; type = "soft"; value = "99999"; } { domain = "@audio"; item = "nofile"; type = "hard"; value = "99999"; } ]; - - systemd.services.jack = { - wantedBy = [ "sound.target" ]; - serviceConfig = { - Type = "simple"; - ExecStart = "${jack2}/bin/jackd -d alsa -M -H -r 96000"; - }; - }; } -- cgit v1.2.3