Make hostName and secretPath configurable through NIX_PATH.
This commit is contained in:
parent
29c876ce83
commit
21b2170e67
2 changed files with 4 additions and 2 deletions
|
@ -3,7 +3,9 @@
|
|||
with lib;
|
||||
|
||||
let
|
||||
machinePath = (builtins.toPath ( ./machines + ("/" + (fileContents /secret/hostName))));
|
||||
# hostName can be set with -I hostName=$HOSTNAME, defaults to the contents of /secret/hostName
|
||||
hostName = (findFirst (elem: elem.prefix == "hostName") { path = (fileContents /secret/hostName); } builtins.nixPath).path;
|
||||
machinePath = (builtins.toPath ( ./machines + ("/" + hostName)));
|
||||
machineConf = machinePath + "/configuration.nix";
|
||||
machineOpts = machinePath + "/options.nix";
|
||||
in {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue