From 620849bcf081465bdd3f306fad119137ab203c50 Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Mon, 11 Jan 2021 16:21:40 -0700 Subject: [PATCH] shell: namespace `flk up` Namespace and stage generated files so that the user can build it right away. --- shell.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/shell.nix b/shell.nix index 3b23540..32c7920 100644 --- a/shell.nix +++ b/shell.nix @@ -20,11 +20,14 @@ let echo "Usage: $(basename "$0") [ iso | up | install {host} | {host} [switch|boot|test] ]" elif [[ "$1" == "up" ]]; then mkdir -p up - nixos-generate-config --dir up + hostname=$(hostname) + nixos-generate-config --dir up/$hostname echo \ "{ - imports = [ ../up/configuration.nix ]; - }" > hosts/up-$(hostname).nix + imports = [ ../up/$hostname/configuration.nix ]; + }" > hosts/up-$hostname.nix + git add -f up/$hostname + git add -f hosts/up-$hostname.nix elif [[ "$1" == "iso" ]]; then nix build ${configs}.niximg.${build}.isoImage elif [[ "$1" == "install" ]]; then