aboutsummaryrefslogtreecommitdiff
path: root/nixos/hosts/ev/hosehawk.nix
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2025-09-18 06:26:56 +0200
committerMartin Fischer <martin@push-f.com>2025-09-18 10:26:02 +0200
commit0f3a5b5a74150ecec89c6befe0510975e2fba5ac (patch)
tree6215bb6202b699fbdbca969689c8886be166210f /nixos/hosts/ev/hosehawk.nix
parente78b42dfe2d4852a39770f8b16b46eed1780e87a (diff)
refactor: specify hosehawk port
Diffstat (limited to 'nixos/hosts/ev/hosehawk.nix')
-rw-r--r--nixos/hosts/ev/hosehawk.nix24
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}/";
+ };
};
}