diff options
Diffstat (limited to 'custom')
-rw-r--r-- | custom/bar-service.nix | 10 | ||||
-rw-r--r-- | custom/thermoprint-service.nix | 18 |
2 files changed, 26 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" = { |
diff --git a/custom/thermoprint-service.nix b/custom/thermoprint-service.nix new file mode 100644 index 00000000..8773706c --- /dev/null +++ b/custom/thermoprint-service.nix | |||
@@ -0,0 +1,18 @@ | |||
1 | { config, lib, pkgs, ... }: | ||
2 | |||
3 | with lib; | ||
4 | |||
5 | { | ||
6 | config = { | ||
7 | nixpkgs.overlays = [(selfPkgs: superPkgs: { | ||
8 | haskellPackages = superPkgs.haskellPackages.extend (selfH: superH: | ||
9 | import ./custom/thermoprint { | ||
10 | callPackage = superPkgs.lib.callPackageWith (selfH // { inherit (superPkgs) stdenv makeWrapper runCommand; }); | ||
11 | extraPackages = (p: []); | ||
12 | } | ||
13 | ); | ||
14 | |||
15 | inherit (selfPkgs.haskellPackages) thermoprint-server thermoprint-webgui tprint; | ||
16 | }; | ||
17 | }; | ||
18 | } | ||