add root as direct arg of mkNexus
This commit is contained in:
parent
8e33eda853
commit
ca65318170
2 changed files with 6 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
4
notes.md
4
notes.md
|
|
@ -46,7 +46,7 @@ nix-instantiate \
|
|||
|
||||
nix/flake.rs: let child = Command::new("nix")
|
||||
/*
|
||||
# `FlakeMetadata::resolve(flake: &str) -> ColmenaREsult<Self>`
|
||||
# `FlakeMetadata::resolve(flake: &str) -> ColmenaResult<Self>`
|
||||
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()`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue