From 920ed6ef907ff29114410bc6489a1826fbf2f62c Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 21 Apr 2018 13:25:11 +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 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bragi.nix b/bragi.nix index 9a9153fe..8ccb6b2b 100644 --- a/bragi.nix +++ b/bragi.nix @@ -98,6 +98,7 @@ in rec { inherit (selfH.callPackage ./custom/thermoprint { inherit (superPkgs) runCommand makeWrapper; extraPackages = (p: with p; [ persistent-postgresql ]); }) thermoprint-spec thermoprint-bbcode thermoprint-client thermoprint-server thermoprint-webgui tprint bbcode; + bar = superPkgs.callPackage ./bragi/bar { haskellPackages = selfH; }; }; }; @@ -105,7 +106,7 @@ in rec { mpd = superPkgs.mpd.override { gmeSupport = false; pulseaudioSupport = false; }; - inherit (selfPkgs.haskellPackages) thermoprint-server thermoprint-webgui tprint; + inherit (selfPkgs.haskellPackages) thermoprint-server thermoprint-webgui tprint bar; }) ]; @@ -343,13 +344,14 @@ in rec { APPROOT = "/bar"; IP_FROM_HEADER = "true"; }; - requires = [ "postgresql.service" ]; + bindsTo = [ "postgresql.service" ]; wantedBy = [ "default.target" ]; + path = with pkgs; [ bar ]; + script = '' + exec bar + ''; serviceConfig = { Type = "notify"; - ExecStart = '' - ${pkgs.callPackage ./bragi/bar {}}/bin/bar - ''; User = users.extraUsers."bar".name; Group = users.extraUsers."bar".group; WorkingDirectory = "~"; -- cgit v1.2.3