deployment shell: add command build-config
This commit is contained in:
parent
2926fc27dc
commit
dad9679647
@ -29,6 +29,9 @@ pkgs.stdenv.mkDerivation {
|
|||||||
eval-config
|
eval-config
|
||||||
Evaluate your node system configuration
|
Evaluate your node system configuration
|
||||||
|
|
||||||
|
build-config
|
||||||
|
Build your node system on your local machine
|
||||||
|
|
||||||
generate-secrets
|
generate-secrets
|
||||||
Create secrets required by your node configuration.
|
Create secrets required by your node configuration.
|
||||||
Secrets are written to ./secrets/
|
Secrets are written to ./secrets/
|
||||||
@ -117,6 +120,13 @@ pkgs.stdenv.mkDerivation {
|
|||||||
echo
|
echo
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
build-config() {(
|
||||||
|
set -euo pipefail
|
||||||
|
system=$(getNodeSystem)
|
||||||
|
NIXOS_CONFIG="${cfgDir}/krops/krops-configuration.nix" \
|
||||||
|
nix-build --no-out-link ${nixpkgs}/nixos $system -A system
|
||||||
|
)}
|
||||||
|
|
||||||
getNodeSystem() {
|
getNodeSystem() {
|
||||||
if [[ -e '${cfgDir}/krops/system' ]]; then
|
if [[ -e '${cfgDir}/krops/system' ]]; then
|
||||||
echo -n "--argstr system "; cat '${cfgDir}/krops/system'
|
echo -n "--argstr system "; cat '${cfgDir}/krops/system'
|
||||||
|
Loading…
Reference in New Issue
Block a user