diff options
author | Soispha <soispha@vhack.eu> | 2023-07-01 18:45:39 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-07-10 16:44:12 +0200 |
commit | c3d2c88eed96b82fa8e83e8b6ee53c414a0e4431 (patch) | |
tree | a5a9553ba5cbf5b6095ae575ecca27356b73c96d /bootstrap/setup/setup.sh | |
parent | Feat(system/disks): Add luks partition (diff) | |
download | nixos-config-c3d2c88eed96b82fa8e83e8b6ee53c414a0e4431.tar.gz nixos-config-c3d2c88eed96b82fa8e83e8b6ee53c414a0e4431.zip |
Refactor(bootstrap): Use disko
Diffstat (limited to 'bootstrap/setup/setup.sh')
-rwxr-xr-x | bootstrap/setup/setup.sh | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/bootstrap/setup/setup.sh b/bootstrap/setup/setup.sh deleted file mode 100755 index a9e534ab..00000000 --- a/bootstrap/setup/setup.sh +++ /dev/null @@ -1,45 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="1.1.4" . %SHELL_LIBRARY_PATH -msg "Select a host-config:" -hosts=$(mktmp); -host=""; - -curl https://codeberg.org/soispha/nixos-config/raw/branch/prime/flake/nixosConfigurations/default.nix 2> /dev/null | awk -F '"' '/hosts = /{for (i=2;i<NF;i+=2) {print $i}}' > "$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://codeberg.org/soispha/nixos-config#${host} --no-root-passwd - -# clone the git config -git clone https://codeberg.org/soispha/nixos-config.git /mnt/srv/etc/nixos - -# setup persistent home dir -mkdir --parents /mnt/srv/home -chown 1000:100 --recursive /mnt/srv/home -chmod 700 /mnt/srv/home - -readp "Do you want to continue with the user configuration setup?[N/y]: " result; -case "$result" in - [yY]) - nix run "git+https://codeberg.org/soispha/nixos-config#config_setup" --experimental-features 'nix-command flakes'; - ;; - *) - msg "Well, if you want to do everything yourself..." - exit 1 - ;; -esac |