From e21bd210c9f8658b3b800d4aec0c74de6ade9893 Mon Sep 17 00:00:00 2001 From: _cry64 Date: Thu, 15 Jan 2026 15:47:02 +1000 Subject: [PATCH] fix impossible relative import --- cerulean/flake-config/nexus.nix | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/cerulean/flake-config/nexus.nix b/cerulean/flake-config/nexus.nix index bdc1ba5..f97d3e5 100644 --- a/cerulean/flake-config/nexus.nix +++ b/cerulean/flake-config/nexus.nix @@ -18,6 +18,13 @@ deploy-rs, ... }: let + inherit + (builtins) + elem + mapAttrs + pathExists + ; + inherit (this) mapNodes @@ -28,7 +35,14 @@ nodeName: node: lib.nixosSystem { system = node.system; - modules = [./hosts/${nodeName}] ++ node.extraModules; + modules = let + core' = config.root + "/hosts/${nodeName}"; + core = + if pathExists core' + then core' + else core' + ".nix"; + in + [core] ++ node.extraModules; # nix passes these to every single module specialArgs = @@ -78,19 +92,19 @@ sshOpts = ssh.opts ++ ( - if builtins.elem "-p" ssh.opts + if elem "-p" ssh.opts then [] else ["-p" (toString ssh.port)] ) ++ ( - if builtins.elem "-A" ssh.opts + if elem "-A" ssh.opts then [] else ["-A"] ); }; }); - checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks deploy) deploy-rs.lib; + checks = mapAttrs (system: deployLib: deployLib.deployChecks deploy) deploy-rs.lib; }; in { mkNexus = outputs: