From dad9679647bf8ee9edfe43b84a92c73e80bed2d3 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Sun, 17 Jul 2022 10:33:24 +0200 Subject: [PATCH] deployment shell: add command `build-config` --- helper/makeShell.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) 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'