diff options
author | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-08-02 14:27:40 +0200 |
---|---|---|
committer | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-08-02 14:27:40 +0200 |
commit | 3c26c0ef573cdf976f4f4d8e98525419afad1972 (patch) | |
tree | 2ba3975bc2e96e68f22428d517b3468887298d71 | |
parent | b20a3f9a30a0e7a8a21f610c6d46f07435251293 (diff) | |
download | nixos-3c26c0ef573cdf976f4f4d8e98525419afad1972.tar nixos-3c26c0ef573cdf976f4f4d8e98525419afad1972.tar.gz nixos-3c26c0ef573cdf976f4f4d8e98525419afad1972.tar.bz2 nixos-3c26c0ef573cdf976f4f4d8e98525419afad1972.tar.xz nixos-3c26c0ef573cdf976f4f4d8e98525419afad1972.zip |
pulseaudio on bragi
-rw-r--r-- | bragi.nix | 44 |
1 files changed, 17 insertions, 27 deletions
@@ -36,18 +36,7 @@ in rec { | |||
36 | }; | 36 | }; |
37 | } | 37 | } |
38 | ); | 38 | ); |
39 | trivmix = let trivmix = customizedHaskellPackages.trivmix; in | 39 | |
40 | pkgs.stdenv.mkDerivation { | ||
41 | name = "trivmix-wrapper"; | ||
42 | nativeBuildInputs = [ pkgs.makeWrapper ]; | ||
43 | buildCommand = '' | ||
44 | mkdir -p $out/bin | ||
45 | makeWrapper ${trivmix}/bin/trivmix $out/bin/trivmix \ | ||
46 | --run "umask 0" \ | ||
47 | --set JACK_PROMISCUOUS_SERVER 1 | ||
48 | ''; | ||
49 | }; | ||
50 | # jack2 = pkgs.callPackage ./customized/jack2.nix {}; | ||
51 | jack2Full = pkgs.symlinkJoin { | 40 | jack2Full = pkgs.symlinkJoin { |
52 | name = "jack2"; | 41 | name = "jack2"; |
53 | paths = [ (pkgs.jack2Full.override { dbus = null; }) ]; | 42 | paths = [ (pkgs.jack2Full.override { dbus = null; }) ]; |
@@ -55,7 +44,6 @@ in rec { | |||
55 | postBuild = '' | 44 | postBuild = '' |
56 | for bin in $out/bin/${"*"}; do | 45 | for bin in $out/bin/${"*"}; do |
57 | wrapProgram $bin \ | 46 | wrapProgram $bin \ |
58 | --set JACK_PROMISCUOUS_SERVER 1 \ | ||
59 | --run "umask 0" | 47 | --run "umask 0" |
60 | done | 48 | done |
61 | ''; | 49 | ''; |
@@ -65,22 +53,9 @@ in rec { | |||
65 | name = "mpd"; | 53 | name = "mpd"; |
66 | paths = [ (pkgs.mpd.override { gmeSupport = false; pulseaudioSupport = false; }) ]; | 54 | paths = [ (pkgs.mpd.override { gmeSupport = false; pulseaudioSupport = false; }) ]; |
67 | buildInputs = [ pkgs.makeWrapper ]; | 55 | buildInputs = [ pkgs.makeWrapper ]; |
68 | postBuild = '' | ||
69 | wrapProgram $out/bin/mpd \ | ||
70 | --set JACK_PROMISCUOUS_SERVER 1 \ | ||
71 | --run "umask 0" | ||
72 | ''; | 56 | ''; |
73 | }; | 57 | }; |
74 | 58 | ||
75 | mpv = pkgs.stdenv.lib.overrideDerivation pkgs.mpv (oldAttrs: { | ||
76 | buildInputs = oldAttrs.buildInputs ++ [pkgs.makeWrapper]; | ||
77 | postInstall = '' | ||
78 | wrapProgram $out/bin/mpv \ | ||
79 | --set JACK_PROMISCUOUS_SERVER 1 \ | ||
80 | --run "umask 0" | ||
81 | ''; | ||
82 | }); | ||
83 | |||
84 | inherit (pkgs.callPackage ./custom/thermoprint {}) thermoprint-server thermoprint-webgui tprint; | 59 | inherit (pkgs.callPackage ./custom/thermoprint {}) thermoprint-server thermoprint-webgui tprint; |
85 | }; | 60 | }; |
86 | 61 | ||
@@ -91,7 +66,7 @@ in rec { | |||
91 | tmux | 66 | tmux |
92 | nfs-utils | 67 | nfs-utils |
93 | jack2Full | 68 | jack2Full |
94 | trivmix | 69 | haskellPackages.trivmix |
95 | zsh | 70 | zsh |
96 | tprint | 71 | tprint |
97 | ]; | 72 | ]; |
@@ -121,6 +96,10 @@ in rec { | |||
121 | ''; | 96 | ''; |
122 | }; | 97 | }; |
123 | 98 | ||
99 | systemd.globalEnvironment = { | ||
100 | JACK_PROMISCUOUS_SERVER = "1"; | ||
101 | }; | ||
102 | |||
124 | systemd.services.jack = { | 103 | systemd.services.jack = { |
125 | wantedBy = [ "sound.target" ]; | 104 | wantedBy = [ "sound.target" ]; |
126 | serviceConfig = { | 105 | serviceConfig = { |
@@ -143,6 +122,17 @@ in rec { | |||
143 | systemd.services."passmix4" = trivmixService { name = "passmix4"; connectOut = "system:playback_3"; connectIn = "system:capture_7"; group = "hel_out"; }; | 122 | systemd.services."passmix4" = trivmixService { name = "passmix4"; connectOut = "system:playback_3"; connectIn = "system:capture_7"; group = "hel_out"; }; |
144 | systemd.services."passmix5" = trivmixService { name = "passmix5"; connectOut = "system:playback_4"; connectIn = "system:capture_8"; group = "hel_out"; }; | 123 | systemd.services."passmix5" = trivmixService { name = "passmix5"; connectOut = "system:playback_4"; connectIn = "system:capture_8"; group = "hel_out"; }; |
145 | 124 | ||
125 | hardware.pulseaudio = { | ||
126 | enable = true; | ||
127 | package = with pkgs; pulseaudioFull; | ||
128 | systemWide = true; | ||
129 | tcp = { | ||
130 | enable = true; | ||
131 | zeroconf.publish.enable = true; | ||
132 | zeroconf.discovery.enable = true; | ||
133 | }; | ||
134 | }; | ||
135 | |||
146 | services.mpd = { | 136 | services.mpd = { |
147 | enable = true; | 137 | enable = true; |
148 | musicDirectory = "/media/odin/music"; | 138 | musicDirectory = "/media/odin/music"; |