diff --git a/cerulean/nexus/nexus.nix b/cerulean/nexus/nexus.nix index 5342080..5fb4866 100644 --- a/cerulean/nexus/nexus.nix +++ b/cerulean/nexus/nexus.nix @@ -50,7 +50,6 @@ Ensure `nexus.${path}` exists under your call to `cerulean.mkNexus`. ''); in { - root = missing "the root directory for all cerulean nix modules." "root"; groups = missing "an list of all valid node group names." "groups"; nodes = Terminal {}; }; @@ -64,7 +63,7 @@ '' else nib.parse.overrideStruct templateNexus nexus; - mkNexus' = nexus': let + mkNexus' = root: nexus': let nexus = parseNexus nexus'; in rec { nixosConfigurations = mapNodes nexus.nodes ( @@ -72,7 +71,7 @@ lib.nixosSystem { system = node.system; modules = let - host' = nexus.root + "/hosts/${nodeName}"; + host' = root + "/hosts/${nodeName}"; host = if pathExists host' then host' @@ -143,8 +142,8 @@ checks = mapAttrs (system: deployLib: deployLib.deployChecks deploy) deploy-rs.lib; }; in { - mkNexus = outputs': let - autogen = mkNexus' <| getAttrOr "nexus" outputs' {}; + mkNexus = root: outputs': let + autogen = mkNexus' root <| getAttrOr "nexus" outputs' {}; outputs = removeAttrs outputs' ["nexus"]; in autogen // outputs; # XXX: TODO: replace this with a deep merge diff --git a/notes.md b/notes.md index 9bc45e1..18cd20d 100644 --- a/notes.md +++ b/notes.md @@ -46,7 +46,7 @@ nix-instantiate \ nix/flake.rs: let child = Command::new("nix") /* -# `FlakeMetadata::resolve(flake: &str) -> ColmenaREsult` +# `FlakeMetadata::resolve(flake: &str) -> ColmenaResult` nix flake metadata \ --json \ --extra-experimental-features "nix-command flakes" @@ -140,7 +140,7 @@ nix/host/local.rs: self.make_privileged_command(&["nix-env", "--pro # XXX: NOTE: Same as `Ssh::activate(...)` # NOTE: This command runs if `goal.should_switch_profile()` -nix-env --profile $SYSTEM+PROFILE +nix-env --profile $SYSTEM_PROFILE --set $PROFILE_PATH # NOTE: Separate command (runs regardless of `goal.should_switch_profile()`)