mirror of
https://gitlab.com/ahoneybun/nyxi-installer.git
synced 2025-05-12 11:04:02 -06:00
Update install.sh
This commit is contained in:
parent
53ed09cae6
commit
2c6cde2ef7
1 changed files with 3 additions and 22 deletions
25
install.sh
25
install.sh
|
@ -14,10 +14,6 @@ read driveName
|
||||||
|
|
||||||
(
|
(
|
||||||
echo g # Create new GPT partition table
|
echo g # Create new GPT partition table
|
||||||
echo n # Create new partition (for EFI).
|
|
||||||
echo # Set default partition number.
|
|
||||||
echo # Set default first sector.
|
|
||||||
echo +1G # Set +1G as last sector.
|
|
||||||
echo n # Create new partition (for root).
|
echo n # Create new partition (for root).
|
||||||
echo # Set default partition number.
|
echo # Set default partition number.
|
||||||
echo # Set default first sector.
|
echo # Set default first sector.
|
||||||
|
@ -26,21 +22,13 @@ echo n # Create new partition (for swap).
|
||||||
echo # Set default partition number.
|
echo # Set default partition number.
|
||||||
echo # Set default first sector.
|
echo # Set default first sector.
|
||||||
echo # Set default last sector (rest of the disk).
|
echo # Set default last sector (rest of the disk).
|
||||||
echo t # Change partition type.
|
|
||||||
echo 1 # Pick first partition.
|
|
||||||
echo 1 # Change first partition to EFI system.
|
|
||||||
echo w # write changes.
|
echo w # write changes.
|
||||||
) | sudo fdisk $driveName -w always -W always
|
) | sudo fdisk $driveName -w always -W always
|
||||||
|
|
||||||
# List the new partitions.
|
# List the new partitions.
|
||||||
lsblk -f
|
lsblk -f
|
||||||
|
|
||||||
# Format the partitions :
|
|
||||||
echo "----------"
|
|
||||||
echo ""
|
|
||||||
echo "Which is the EFI partition?"
|
|
||||||
read efiName
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Which is the root partition?"
|
echo "Which is the root partition?"
|
||||||
read rootName
|
read rootName
|
||||||
|
@ -49,10 +37,7 @@ echo ""
|
||||||
echo "Do you want Hibernation?"
|
echo "Do you want Hibernation?"
|
||||||
echo "1) Yes"
|
echo "1) Yes"
|
||||||
echo "2) No"
|
echo "2) No"
|
||||||
read hibState
|
read hibState
|
||||||
|
|
||||||
# Create EFI partition
|
|
||||||
sudo mkfs.fat -F32 -n EFI $efiName
|
|
||||||
|
|
||||||
# Encrypt the root partition
|
# Encrypt the root partition
|
||||||
sudo cryptsetup luksFormat -v -s 512 -h sha512 $rootName
|
sudo cryptsetup luksFormat -v -s 512 -h sha512 $rootName
|
||||||
|
@ -100,10 +85,6 @@ sudo mount -o noatime,commit=120,compress=zstd:10,subvol=@ /dev/lvm/root /mnt
|
||||||
sudo mkdir /mnt/home/
|
sudo mkdir /mnt/home/
|
||||||
sudo mount -o noatime,commit=120,compress=zstd:10,subvol=@home /dev/lvm/root /mnt/home
|
sudo mount -o noatime,commit=120,compress=zstd:10,subvol=@home /dev/lvm/root /mnt/home
|
||||||
|
|
||||||
# Mount the EFI partition.
|
|
||||||
sudo mkdir /mnt/boot/
|
|
||||||
sudo mount $efiName /mnt/boot
|
|
||||||
|
|
||||||
# Generate Nix configuration
|
# Generate Nix configuration
|
||||||
sudo nixos-generate-config --root /mnt
|
sudo nixos-generate-config --root /mnt
|
||||||
|
|
||||||
|
@ -113,7 +94,7 @@ sudo nixos-generate-config --root /mnt
|
||||||
echo "Default username and password are in the configuration.nix file"
|
echo "Default username and password are in the configuration.nix file"
|
||||||
echo "Password is hashed so it is not plaintext"
|
echo "Password is hashed so it is not plaintext"
|
||||||
|
|
||||||
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/systems/php.nix > configuration.nix; sudo mv -f configuration.nix /mnt/etc/nixos/
|
||||||
curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/programs.nix > programs.nix; sudo mv -f programs.nix /mnt/etc/nixos/
|
curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/programs.nix > programs.nix; sudo mv -f programs.nix /mnt/etc/nixos/
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue