summaryrefslogtreecommitdiff
path: root/custom/bar-service.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2018-09-08 14:44:52 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2018-09-08 14:44:52 +0200
commit0c1a178890baa67d5407663b05823d3092ff660a (patch)
treef8c22f9da831b1151adf6fd93ce97627588d3de6 /custom/bar-service.nix
parent3583c11b77ece68ba4c35f8cd1fbdaff820ac7d1 (diff)
downloadnixos-0c1a178890baa67d5407663b05823d3092ff660a.tar
nixos-0c1a178890baa67d5407663b05823d3092ff660a.tar.gz
nixos-0c1a178890baa67d5407663b05823d3092ff660a.tar.bz2
nixos-0c1a178890baa67d5407663b05823d3092ff660a.tar.xz
nixos-0c1a178890baa67d5407663b05823d3092ff660a.zip
bar depends on thermoprint
Diffstat (limited to 'custom/bar-service.nix')
-rw-r--r--custom/bar-service.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/custom/bar-service.nix b/custom/bar-service.nix
index 2a492ce1..aa08f7cd 100644
--- a/custom/bar-service.nix
+++ b/custom/bar-service.nix
@@ -53,6 +53,8 @@ in {
53 }; 53 };
54 54
55 config = mkIf cfg.enable { 55 config = mkIf cfg.enable {
56 imports = [ ./thermoprint-service.nix ];
57
56 assertions = [ 58 assertions = [
57 { assertion = config.services.postgresql.enable; 59 { assertion = config.services.postgresql.enable;
58 message = "bar requires PostgreSQL"; 60 message = "bar requires PostgreSQL";
@@ -69,8 +71,12 @@ in {
69 71
70 users.groups."${cfg.group}" = {}; 72 users.groups."${cfg.group}" = {};
71 73
72 nixpkgs.overlays = [(self: super: { 74 nixpkgs.overlays = [(selfPkgs: superPkgs: {
73 bar = self.callPackage ./bar { inherit (self) haskellPackages; }; 75 haskellPackages = superPkgs.haskellPackages.extend (selfH: superH: {
76 bar = superPkgs.callPackage ./bar { haskellPackages = selfH };
77 });
78
79 inherit (selfPkgs.haskellPackages) bar;
74 })]; 80 })];
75 81
76 systemd.services."bar" = { 82 systemd.services."bar" = {