mirror of
https://gitlab.com/ahoneybun/nyxi-installer.git
synced 2025-05-12 11:04:02 -06:00
chore: reorder and add comments to make code cleaner
This commit is contained in:
parent
eea3b738ec
commit
2704e92aea
1 changed files with 9 additions and 9 deletions
18
install.sh
18
install.sh
|
@ -2,34 +2,34 @@
|
|||
# then sets it as a variable for hibernation support
|
||||
ramTotal=$(free -h | awk '/^Mem:/{print $2}'| awk -FG {'print$1'})
|
||||
|
||||
# Detect and list the drives.
|
||||
lsblk -f
|
||||
|
||||
# Step 1: Choosing the drive for the installation
|
||||
|
||||
# Choice the drive to use :
|
||||
## Detect and list the drives.
|
||||
lsblk -f
|
||||
|
||||
## Choice the drive to use :
|
||||
echo "----------"
|
||||
echo "Which drive do we want to use for this installation?"
|
||||
echo "For example /dev/sda or /dev/nvme0n1"
|
||||
read driveName
|
||||
|
||||
# Download Disko file
|
||||
## Download Disko file
|
||||
cd /tmp
|
||||
curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/partitions/luks-btrfs-subvolumes.nix -o /tmp/disko-config.nix
|
||||
|
||||
# Replace drive in Disko file
|
||||
## Replace drive in Disko file
|
||||
sudo sed -i "s#/dev/sda#$driveName#g" /tmp/disko-config.nix
|
||||
|
||||
# Step 2: Partitioning the drive used for the installation
|
||||
|
||||
# Run Disko to partition the disk
|
||||
## Run Disko to partition the disk
|
||||
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko /tmp/disko-config.nix
|
||||
|
||||
# Generate Nix configuration
|
||||
## Generate Nix configuration
|
||||
sudo nixos-generate-config --no-filesystems --root /mnt
|
||||
sudo mv /tmp/disko-config.nix /mnt/etc/nixos
|
||||
|
||||
# Downloads and places the predefinded generic flake to use
|
||||
## Downloads and places the predefinded generic flake to use
|
||||
curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/
|
||||
curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/configuration.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/
|
||||
curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/home.nix > home.nix; sudo mv -f home.nix /mnt/etc/nixos/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue