diff --git a/helper/makeShell.nix b/helper/makeShell.nix index 50c7f87..2ab42df 100644 --- a/helper/makeShell.nix +++ b/helper/makeShell.nix @@ -29,6 +29,9 @@ pkgs.stdenv.mkDerivation { eval-config Evaluate your node system configuration + build-config + Build your node system on your local machine + generate-secrets Create secrets required by your node configuration. Secrets are written to ./secrets/ @@ -117,6 +120,13 @@ pkgs.stdenv.mkDerivation { 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() { if [[ -e '${cfgDir}/krops/system' ]]; then echo -n "--argstr system "; cat '${cfgDir}/krops/system'