From 698ddcc02af4e8bae077bb2c3e66f41802328741 Mon Sep 17 00:00:00 2001 From: Julien Malka Date: Wed, 29 Dec 2021 18:20:42 +0100 Subject: [PATCH] Fixed my knowledge about attribute set merging --- machines/newton/default.nix | 5 ++++- modules/bincache/default.nix | 4 ++-- modules/drone/default.nix | 4 ++-- modules/filerun/default.nix | 4 ++-- modules/hydra/default.nix | 4 ++-- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/machines/newton/default.nix b/machines/newton/default.nix index 22692ff..e013682 100644 --- a/machines/newton/default.nix +++ b/machines/newton/default.nix @@ -12,7 +12,10 @@ in ]; luj = { - filerun.enable = true; + filerun = { + enable = true; + subdomain = "cloud"; + }; zfs-mails.enable = true; }; diff --git a/modules/bincache/default.nix b/modules/bincache/default.nix index 255c03f..96b2d91 100644 --- a/modules/bincache/default.nix +++ b/modules/bincache/default.nix @@ -13,7 +13,7 @@ with lib; }; - config = mkIf cfg.enable + config = mkIf cfg.enable (recursiveUpdate { users.users.nix-serve = { isSystemUser = true; @@ -32,5 +32,5 @@ with lib; port = port; }; - } // mkSubdomain cfg.subdomain port; + } (mkSubdomain cfg.subdomain port)); } diff --git a/modules/drone/default.nix b/modules/drone/default.nix index 8d8b8c1..831bff1 100644 --- a/modules/drone/default.nix +++ b/modules/drone/default.nix @@ -14,7 +14,7 @@ in }; }; - config = mkIf cfg.enable { + config = mkIf cfg.enable (recursiveUpdate { users.users.drone = { isNormalUser = true; @@ -93,5 +93,5 @@ in path = [ pkgs.nixUnstable pkgs.git pkgs.openssh ]; }; - } // mkSubdomain cfg.subdomain port; + } (mkSubdomain cfg.subdomain port)); } diff --git a/modules/filerun/default.nix b/modules/filerun/default.nix index c6efd72..bb5aa20 100644 --- a/modules/filerun/default.nix +++ b/modules/filerun/default.nix @@ -15,7 +15,7 @@ in }; - config = mkIf cfg.enable { + config = mkIf cfg.enable (recursiveUpdate { sops.secrets.filerun = {}; @@ -83,6 +83,6 @@ in extraOptions = [ "--network=filerun-br" ]; }; - } // mkSubdomain cfg.subdomain port; + } (mkSubdomain cfg.subdomain port)); } diff --git a/modules/hydra/default.nix b/modules/hydra/default.nix index f7fffbd..914cc05 100644 --- a/modules/hydra/default.nix +++ b/modules/hydra/default.nix @@ -28,9 +28,9 @@ in networking.firewall = { allowedTCPPorts = [ port ]; }; } - (mkIf cfg.nginx.enable { + (mkIf cfg.nginx.enable (recursiveUpdate { services.hydra.hydraURL = "${cfg.nginx.subdomain}.julienmalka.me"; - } // mkSubdomain cfg.nginx.subdomain port )]); + } (mkSubdomain cfg.nginx.subdomain port)) )]);