aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/install
diff options
context:
space:
mode:
authorene <ene@sils.li>2023-02-21 12:27:53 +0100
committerene <ene@sils.li>2023-02-21 12:27:53 +0100
commit78685e847a282f132057ebe0bac20ddba186d518 (patch)
tree2b392b6321918008dcdff8c4f8c7f53275026557 /bootstrap/install
parentFix(system): Fix typo in fs names (diff)
downloadnixos-config-78685e847a282f132057ebe0bac20ddba186d518.zip
Feat(bootstrap): Add a setup script
Diffstat (limited to 'bootstrap/install')
-rwxr-xr-xbootstrap/install/install.sh24
1 files changed, 2 insertions, 22 deletions
diff --git a/bootstrap/install/install.sh b/bootstrap/install/install.sh
index be44cde3..ce22b8cd 100755
--- a/bootstrap/install/install.sh
+++ b/bootstrap/install/install.sh
@@ -93,31 +93,11 @@ mne persistent-storage /mnt/srv
mount --mkdir --options bind /mnt/srv/nixos-config /mnt/etc/nixos
msg "Finished mounting and generating btrfs subvolumes"
+
readp "Do you want to continue with nixos-install? [N/y]: " result
case $result in
[Yy])
- msg "Great, select a host-config:"
- hosts=$(mktmp);
- host="";
-
- awk -F "." '/inputs.nixpkgs.lib.nixosSystem/{print $1}' "$(tmp 'curl https://git.sils.li/ene/nixos-config/raw/branch/prime/flake/nixosConfigurations/default.nix 2> /dev/null')" | awk '{print $1}' > $hosts;
-
- while ! grep "$host" "$hosts" > /dev/null || [ "$(printf "%s" "$host" | wc -c)" -eq 0 ]; do
- i=1;
- while read -r ho ; do
- printf "%4s) %s \n" "$i" "$ho";
- i=$((i+1));
- done < "$hosts"
- printf "%4s) Exit\n" "q"
- readp "Enter a option: " host
-
- [ "$host" = "q" ] && exit 1
- host=$(awk -v i="$host" '{if (NR==i) {print $0}}' "$hosts");
- if ! grep "$host" "$hosts" > /dev/null || [ "$(printf "%s" "$host" | wc -c)" -eq 0 ]; then
- warning "No host selected. Select a host to continue.\n"
- fi
- done
- nixos-install --flake git+https://git.sils.li/ene/nixos-config#${host} --no-root-passwd
+ nix run "git+https://git.sils.li/ene/nixos-config#setup";
;;
*)
msg "Sure, do it yourself"