summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2015-06-07 15:05:46 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2015-06-07 15:05:46 +0200
commitc46ce2a94b14b386d70debadfee008bcc82b9424 (patch)
tree907114ab7932aa924bc354955649f1c669bf43e0
parentbf3f3f6cfc7bc39ea8dab7164ec4ed0e385bebe8 (diff)
downloadnixos-c46ce2a94b14b386d70debadfee008bcc82b9424.tar
nixos-c46ce2a94b14b386d70debadfee008bcc82b9424.tar.gz
nixos-c46ce2a94b14b386d70debadfee008bcc82b9424.tar.bz2
nixos-c46ce2a94b14b386d70debadfee008bcc82b9424.tar.xz
nixos-c46ce2a94b14b386d70debadfee008bcc82b9424.zip
mpd service
-rw-r--r--bragi.nix30
1 files changed, 22 insertions, 8 deletions
diff --git a/bragi.nix b/bragi.nix
index ba127f1c..da7c6d6d 100644
--- a/bragi.nix
+++ b/bragi.nix
@@ -25,6 +25,8 @@ in {
25 allowPing = true; 25 allowPing = true;
26 allowedUDPPortRanges = [ { from = 60000; to = 61000; } # mosh-server 26 allowedUDPPortRanges = [ { from = 60000; to = 61000; } # mosh-server
27 ]; 27 ];
28 allowedTCPPorts = [ 6600 # MPD
29 ];
28 }; 30 };
29 31
30 environment.systemPackages = with pkgs; [ 32 environment.systemPackages = with pkgs; [
@@ -58,6 +60,26 @@ in {
58 ''; 60 '';
59 }; 61 };
60 62
63 systemd.services.jack = {
64 wantedBy = [ "sound.target" ];
65 serviceConfig = {
66 Type = "simple";
67 ExecStart = "${jack2}/bin/jackd -d alsa -M -H -r 96000";
68 };
69 };
70
71 services.mpd = {
72 enable = true;
73 musicDirectory = "/media/odin/music";
74 extraConfig = ''
75 audio_output {
76 name "JACK"
77 type "jack"
78 client_name "mpd"
79 }
80 '';
81 };
82
61 users.extraUsers.guest = { 83 users.extraUsers.guest = {
62 name = "gkleen"; 84 name = "gkleen";
63 isNormalUser = true; 85 isNormalUser = true;
@@ -80,12 +102,4 @@ in {
80 { domain = "@audio"; item = "nofile"; type = "soft"; value = "99999"; } 102 { domain = "@audio"; item = "nofile"; type = "soft"; value = "99999"; }
81 { domain = "@audio"; item = "nofile"; type = "hard"; value = "99999"; } 103 { domain = "@audio"; item = "nofile"; type = "hard"; value = "99999"; }
82 ]; 104 ];
83
84 systemd.services.jack = {
85 wantedBy = [ "sound.target" ];
86 serviceConfig = {
87 Type = "simple";
88 ExecStart = "${jack2}/bin/jackd -d alsa -M -H -r 96000";
89 };
90 };
91} 105}