diff options
Diffstat (limited to 'nixos/hosts/ev/hosehawk.nix')
-rw-r--r-- | nixos/hosts/ev/hosehawk.nix | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/nixos/hosts/ev/hosehawk.nix b/nixos/hosts/ev/hosehawk.nix index 146272d..09637cd 100644 --- a/nixos/hosts/ev/hosehawk.nix +++ b/nixos/hosts/ev/hosehawk.nix @@ -1,14 +1,28 @@ -{ config, pkgs, ... }: +{ config, lib, pkgs, ... }: +let + cfg = config.hosehawk; +in { imports = [ /home/martin/repos/hosehawk/services/hosenest.nix /home/martin/repos/hosehawk/services/hosehawk.nix ]; - services.hosenest.enable = true; - services.hosehawk = { - enable = true; - hosenestUrl = "http://localhost:${toString config.services.hosenest.port}/"; + options.hosehawk = { + port = lib.mkOption { + type = lib.types.int; + }; + }; + + config = { + services.hosenest = { + enable = true; + port = cfg.port; + }; + services.hosehawk = { + enable = true; + hosenestUrl = "http://localhost:${toString cfg.port}/"; + }; }; } |