diff options
author | ene <ene@sils.li> | 2023-03-21 16:52:42 +0100 |
---|---|---|
committer | ene <ene@sils.li> | 2023-03-21 16:55:55 +0100 |
commit | e7f2ae75a3d6b51e30ca6b19af53e3ecf24def3a (patch) | |
tree | 9e1054e5eb057d059f59fe7b676ca7db65f8afa3 | |
parent | Fix(bootstrap/install): Add 'free' dependency (diff) | |
download | nixos-config-e7f2ae75a3d6b51e30ca6b19af53e3ecf24def3a.tar.gz nixos-config-e7f2ae75a3d6b51e30ca6b19af53e3ecf24def3a.zip |
Style(bootstrap/install): Improve the msg output
Diffstat (limited to '')
-rwxr-xr-x | bootstrap/install/install.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bootstrap/install/install.sh b/bootstrap/install/install.sh index ae00c8f8..6577fc6e 100755 --- a/bootstrap/install/install.sh +++ b/bootstrap/install/install.sh @@ -97,10 +97,9 @@ mount --mkdir --options bind /mnt/srv/nixos-config /mnt/etc/nixos msg "Finished mounting and generating btrfs subvolumes" msg "Creating swapfile..." -btrfs filesystem mkswapfile --size "$(free -m | awk '{if (NR==2) {printf "%sm\n", $2 + 500}}')" /mnt/swap/swapfile +msg2 "$(btrfs filesystem mkswapfile --size "$(free -m | awk '{if (NR==2) {printf "%sm\n", $2 + 500}}')" /mnt/swap/swapfile)"; resume_offset=$(btrfs inspect-internal map-swapfile -r /mnt/swap/swapfile); swap_uuid=$(findmnt -no UUID -T /mnt/swap/swapfile); -msg "Finished creating the swapfile"; msg2 "UUID is: " "$swap_uuid"; msg2 "Resume offset is: " "$resume_offset"; @@ -108,7 +107,7 @@ msg "Checking for incompatibilities..." ssd_or_hdd=$(cat /sys/block/$disk/queue/rotational); case "$ssd_or_hdd" in 0) - msg "You seem to use a ssd." + msg2 "You seem to use a ssd." trim_support=$(lsblk --bytes --json --discard | jq --arg name "$disk" '.blockdevices | .[] | select(.name == $name) | (.["disc-gran"] + .["disc-max"]) != 0'); case $trim_support in "true") @@ -123,7 +122,7 @@ case "$ssd_or_hdd" in esac ;; 1) - msg "You seem to use a hdd there is nothing you have to do"; + msg2 "You seem to use a hdd there is nothing you have to do"; ;; *) warning "There is no indicator, which shows, which drive your are using.\n This means, that you have to check yourself, which optimizations you should activate." |