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`.
|
Ensure `nexus.${path}` exists under your call to `cerulean.mkNexus`.
|
||||||
'');
|
'');
|
||||||
in {
|
in {
|
||||||
root = missing "the root directory for all cerulean nix modules." "root";
|
|
||||||
groups = missing "an list of all valid node group names." "groups";
|
groups = missing "an list of all valid node group names." "groups";
|
||||||
nodes = Terminal {};
|
nodes = Terminal {};
|
||||||
};
|
};
|
||||||
|
|
@ -64,7 +63,7 @@
|
||||||
''
|
''
|
||||||
else nib.parse.overrideStruct templateNexus nexus;
|
else nib.parse.overrideStruct templateNexus nexus;
|
||||||
|
|
||||||
mkNexus' = nexus': let
|
mkNexus' = root: nexus': let
|
||||||
nexus = parseNexus nexus';
|
nexus = parseNexus nexus';
|
||||||
in rec {
|
in rec {
|
||||||
nixosConfigurations = mapNodes nexus.nodes (
|
nixosConfigurations = mapNodes nexus.nodes (
|
||||||
|
|
@ -72,7 +71,7 @@
|
||||||
lib.nixosSystem {
|
lib.nixosSystem {
|
||||||
system = node.system;
|
system = node.system;
|
||||||
modules = let
|
modules = let
|
||||||
host' = nexus.root + "/hosts/${nodeName}";
|
host' = root + "/hosts/${nodeName}";
|
||||||
host =
|
host =
|
||||||
if pathExists host'
|
if pathExists host'
|
||||||
then host'
|
then host'
|
||||||
|
|
@ -143,8 +142,8 @@
|
||||||
checks = mapAttrs (system: deployLib: deployLib.deployChecks deploy) deploy-rs.lib;
|
checks = mapAttrs (system: deployLib: deployLib.deployChecks deploy) deploy-rs.lib;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
mkNexus = outputs': let
|
mkNexus = root: outputs': let
|
||||||
autogen = mkNexus' <| getAttrOr "nexus" outputs' {};
|
autogen = mkNexus' root <| getAttrOr "nexus" outputs' {};
|
||||||
outputs = removeAttrs outputs' ["nexus"];
|
outputs = removeAttrs outputs' ["nexus"];
|
||||||
in
|
in
|
||||||
autogen // outputs; # XXX: TODO: replace this with a deep merge
|
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")
|
nix/flake.rs: let child = Command::new("nix")
|
||||||
/*
|
/*
|
||||||
# `FlakeMetadata::resolve(flake: &str) -> ColmenaREsult<Self>`
|
# `FlakeMetadata::resolve(flake: &str) -> ColmenaResult<Self>`
|
||||||
nix flake metadata \
|
nix flake metadata \
|
||||||
--json \
|
--json \
|
||||||
--extra-experimental-features "nix-command flakes"
|
--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(...)`
|
# XXX: NOTE: Same as `Ssh::activate(...)`
|
||||||
|
|
||||||
# NOTE: This command runs if `goal.should_switch_profile()`
|
# NOTE: This command runs if `goal.should_switch_profile()`
|
||||||
nix-env --profile $SYSTEM+PROFILE
|
nix-env --profile $SYSTEM_PROFILE
|
||||||
--set $PROFILE_PATH
|
--set $PROFILE_PATH
|
||||||
|
|
||||||
# NOTE: Separate command (runs regardless of `goal.should_switch_profile()`)
|
# NOTE: Separate command (runs regardless of `goal.should_switch_profile()`)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue