From f59c0553147c02b4c925edf8c99596edbd1079e8 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 16 Apr 2018 13:20:51 +0200 Subject: =?UTF-8?q?=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bragi.nix | 8 +++----- bragi/bar/default.nix | 2 +- custom/trivmix-service.nix | 8 +++++++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/bragi.nix b/bragi.nix index b5c0d82a..59bcbd1e 100644 --- a/bragi.nix +++ b/bragi.nix @@ -89,7 +89,6 @@ in rec { encoding = haskell.lib.overrideCabal encoding ( oldAttrs: { src = fetchFromGitHub { owner = "pngwjpgh"; repo = "encoding"; rev = "extended-version-bounds"; sha256 = "0pzxixp384a1ywzj56pl7xc4ln7i9x6mq8spqjwcs80y0pgfpp9s"; }; }); - trivmix = self.callPackage ./custom/trivmix/trivmix.nix {}; inherit (lib.mapAttrs (name: haskell.lib.dontCheck) super) Glob filelock hedgehog; @@ -103,7 +102,7 @@ in rec { mpd = mpd.override { gmeSupport = false; pulseaudioSupport = false; }; - inherit (pkgs.haskellPackages) trivmix thermoprint-server thermoprint-webgui tprint; + inherit (pkgs.haskellPackages) thermoprint-server thermoprint-webgui tprint; }; allowUnfree = true; @@ -116,7 +115,6 @@ in rec { tmux nfs-utils jack2Full - trivmix zsh tprint samba @@ -311,13 +309,13 @@ in rec { systemd.services."thermoprint" = { environment = { THERMOPRINT_CONFIG = ./bragi/thermoprint-server; - THERMOPRINT_CACHE = ''${users.extraUsers."thermoprint".home}/dyre''; + THERMOPRINT_CACHE = "${users.extraUsers."thermoprint".home}/dyre"; }; requires = [ "postgresql.service" ]; wantedBy = [ "default.target" ]; serviceConfig = { Type = "simple"; - ExecStart = ''${pkgs.thermoprint-server}/bin/thermoprint-server --force-reconf''; + ExecStart = "${pkgs.thermoprint-server}/bin/thermoprint-server --force-reconf"; User = users.extraUsers."thermoprint".name; Group = users.extraUsers."thermoprint".group; WorkingDirectory = "~"; diff --git a/bragi/bar/default.nix b/bragi/bar/default.nix index 69d89edd..98b36901 100644 --- a/bragi/bar/default.nix +++ b/bragi/bar/default.nix @@ -6,7 +6,7 @@ }: let - pkg = haskell.lib.doJailbreak (haskellPackages.callPackage ./generated.nix {}); + pkg = haskellPackages.callPackage ./generated.nix {}; webshim = stdenv.mkDerivation rec { name = "webshim-${version}"; version = "1.16.0"; diff --git a/custom/trivmix-service.nix b/custom/trivmix-service.nix index 14f2e3c8..1c1403ec 100644 --- a/custom/trivmix-service.nix +++ b/custom/trivmix-service.nix @@ -5,6 +5,8 @@ with lib; let cfg = config.services.trivmix; + trivmix = pkgs.haskellPackages.callPackage ./trivmix {}; + mixerModule = { options = { connectIn = mkOption { @@ -85,5 +87,9 @@ in { description = "Definition of mixers"; }; - config.systemd.services = mapAttrs service cfg; + config = mkIf (cfg != {}) { + environment.systemPackages = [ trivmix ]; + + systemd.services = mapAttrs service cfg; + }; } -- cgit v1.2.3