From f512c7c7bbb2a68199ce29ea711a4f63a57e4a07 Mon Sep 17 00:00:00 2001 From: pagedmov Date: Thu, 17 Oct 2024 22:03:04 -0400 Subject: [PATCH] more installer configuration --- hosts/installer/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hosts/installer/default.nix b/hosts/installer/default.nix index 68bd1df..7cae87b 100644 --- a/hosts/installer/default.nix +++ b/hosts/installer/default.nix @@ -30,8 +30,12 @@ let echo -n "Which drive do you wish to sacrifice? " read -r drive + size=$(lsblk -b -d -o NAME,SIZE | grep "$drive" | awk '{ printf "%.0f\n", $2 / 1024 / 1024 / 1024 }') 1024 / 1024 / 1024 }') + root_end=$(echo "scale=0;$size * 0.10 / 1" | bc) + nix_end=$(echo "scale=0;$size * 0.35 / 1" | bc) + # commence formatting - nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko /tmp/install_pwd/disko.nix --arg device "\"/dev/$drive\"" + nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko /tmp/install_pwd/disko.nix --arg device "\"/dev/$drive\"" --arg root_end "\"$root_end\G\"" --arg nix_end "\"$nix_end\G\"" # set up home directory in /mnt/persist, create /persist/etc/nixos, cd to /etc/nixos and install my flake config mkdir -p /mnt/etc