summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bragi.nix29
-rw-r--r--customized/trivmix.nix7
2 files changed, 30 insertions, 6 deletions
diff --git a/bragi.nix b/bragi.nix
index a64b7fda..1ca3e605 100644
--- a/bragi.nix
+++ b/bragi.nix
@@ -1,6 +1,16 @@
1{ config, pkgs, ... }: 1{ config, pkgs, ... }:
2 2let
3{ 3 makemix = (n: {
4 wantedBy = [ "sound.target" ];
5 requires = [ "jack.service" ];
6 serviceConfig = {
7 Type = "simple";
8 ExecStart = "${pkgs.trivmix}/bin/trivmix --client mix --input 'in_${n}' --output 'out_${n}' --dir /run/jackmix_${n}";
9 User = "jack";
10 Group = "audio;"
11 };
12 });
13in {
4 imports = 14 imports =
5 [ 15 [
6 ./bragi-hw.nix 16 ./bragi-hw.nix
@@ -25,7 +35,17 @@
25 35
26 nixpkgs.config.packageOverrides = pkgs: 36 nixpkgs.config.packageOverrides = pkgs:
27 { 37 {
28 trivmix = pkgs.callPackage ./customized/trivmix.nix {}; 38 trivmix = let trivmix = pkgs.callPackage ./customized/trivmix.nix {}; in
39 stdenv.mkDerivation {
40 name = "trivmix-wrapper";
41 nativeBuildInputs = [ pkgs.makeWrapper ];
42 buildCommand = ''
43 mkdir -p $out/bin
44 makeWrapper ${trivmix}/bin/trivmix $out/bin/trivmix \
45 --run "umask 0" \
46 --set JACK_PROMISCUOUS_SERVER 1
47 '';
48 };
29 jack2 = pkgs.callPackage ./customized/jack2.nix {}; 49 jack2 = pkgs.callPackage ./customized/jack2.nix {};
30 mpd = pkgs.callPackage ./customized/mpd.nix { 50 mpd = pkgs.callPackage ./customized/mpd.nix {
31 gmeSupport = false; 51 gmeSupport = false;
@@ -82,6 +102,9 @@
82 }; 102 };
83 }; 103 };
84 104
105 systemd.services."trivmix_0" = (makemix 0);
106 systemd.services."trivmix_1" = (makemix 1);
107
85 services.mpd = { 108 services.mpd = {
86 enable = true; 109 enable = true;
87 musicDirectory = "/media/odin/music"; 110 musicDirectory = "/media/odin/music";
diff --git a/customized/trivmix.nix b/customized/trivmix.nix
index aefc09e5..6c4417fd 100644
--- a/customized/trivmix.nix
+++ b/customized/trivmix.nix
@@ -1,16 +1,17 @@
1# This file was auto-generated by cabal2nix. Please do NOT edit manually! 1# This file was auto-generated by cabal2nix. Please do NOT edit manually!
2 2
3{ cabal, filepath, hinotify, jack, optparseApplicative 3{ cabal, filepath, hinotify, jack, optparseApplicative
4, fetchgit
4, transformers 5, transformers
5}: 6}:
6 7
7cabal.mkDerivation (self: { 8cabal.mkDerivation (self: {
8 pname = "trivmix"; 9 pname = "trivmix";
9 version = "0.0.0"; 10 version = "0.1.0";
10 src = fetchgit { 11 src = fetchgit {
11 url = git://git.yggdrasil.li/trivmix; 12 url = git://git.yggdrasil.li/trivmix;
12 rev = "bd7874ef606ae78bb8b626bd01906481feb784d6"; 13 rev = "5e46af12608b35b73b7ac1f83e59585671d19e48";
13 sha256 = "284f2b38daf7685ad9d92f39872cdf78c870b1997a8d8ac027fd75d187a505ea"; 14 sha256 = "4e78ddb3a3118ac99f64a927cc3166e2c5b898ac31242ec7b5494d8efd3e8ec4";
14 }; 15 };
15 isLibrary = false; 16 isLibrary = false;
16 isExecutable = true; 17 isExecutable = true;