forked from pub-solar/os
shell: namespace flk up
Namespace and stage generated files so that the user can build it right away.
This commit is contained in:
parent
86ee736552
commit
620849bcf0
|
@ -20,11 +20,14 @@ let
|
||||||
echo "Usage: $(basename "$0") [ iso | up | install {host} | {host} [switch|boot|test] ]"
|
echo "Usage: $(basename "$0") [ iso | up | install {host} | {host} [switch|boot|test] ]"
|
||||||
elif [[ "$1" == "up" ]]; then
|
elif [[ "$1" == "up" ]]; then
|
||||||
mkdir -p up
|
mkdir -p up
|
||||||
nixos-generate-config --dir up
|
hostname=$(hostname)
|
||||||
|
nixos-generate-config --dir up/$hostname
|
||||||
echo \
|
echo \
|
||||||
"{
|
"{
|
||||||
imports = [ ../up/configuration.nix ];
|
imports = [ ../up/$hostname/configuration.nix ];
|
||||||
}" > hosts/up-$(hostname).nix
|
}" > hosts/up-$hostname.nix
|
||||||
|
git add -f up/$hostname
|
||||||
|
git add -f hosts/up-$hostname.nix
|
||||||
elif [[ "$1" == "iso" ]]; then
|
elif [[ "$1" == "iso" ]]; then
|
||||||
nix build ${configs}.niximg.${build}.isoImage
|
nix build ${configs}.niximg.${build}.isoImage
|
||||||
elif [[ "$1" == "install" ]]; then
|
elif [[ "$1" == "install" ]]; then
|
||||||
|
|
Loading…
Reference in a new issue