fix impossible relative import

This commit is contained in:
do butterflies cry? 2026-01-15 15:47:02 +10:00
parent 7735f61670
commit e21bd210c9

View file

@ -18,6 +18,13 @@
deploy-rs, deploy-rs,
... ...
}: let }: let
inherit
(builtins)
elem
mapAttrs
pathExists
;
inherit inherit
(this) (this)
mapNodes mapNodes
@ -28,7 +35,14 @@
nodeName: node: nodeName: node:
lib.nixosSystem { lib.nixosSystem {
system = node.system; 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 # nix passes these to every single module
specialArgs = specialArgs =
@ -78,19 +92,19 @@
sshOpts = sshOpts =
ssh.opts ssh.opts
++ ( ++ (
if builtins.elem "-p" ssh.opts if elem "-p" ssh.opts
then [] then []
else ["-p" (toString ssh.port)] else ["-p" (toString ssh.port)]
) )
++ ( ++ (
if builtins.elem "-A" ssh.opts if elem "-A" ssh.opts
then [] then []
else ["-A"] else ["-A"]
); );
}; };
}); });
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks deploy) deploy-rs.lib; checks = mapAttrs (system: deployLib: deployLib.deployChecks deploy) deploy-rs.lib;
}; };
in { in {
mkNexus = outputs: mkNexus = outputs: