dotfiles

My PC Dotfiles & Website
commit b3e3982722ca494bd0ccbcb50356a909f9c13411
parent 10c7e4770bbddb0582572eec9773419e0f9a8ed9
Author: maydayv7 <maydayv7@gmail.com>
Date:   Tue, 10 Sep 2024 19:36:55 +0530

fix: Fix Installation

Diffstat:

Mscripts/install.nix | 8+++++++-
Mscripts/nixos.nix | 5+++--
2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/scripts/install.nix b/scripts/install.nix @@ -18,6 +18,12 @@ with files.path; let echo "Deleting Partitions..." dd if=/dev/zero of=/dev/"$DISK" bs=512 count=1 + if [[ "$DISK" == nvme* ]] + then + parted /dev/"$DISK" --script mklabel gpt + else + parted /dev/"$DISK" --script mklabel msdos + fi echo "Creating Partitions..." parted /dev/"$DISK" -- mkpart ESP fat32 1MiB 1024MiB @@ -118,7 +124,6 @@ in error "This Command must be Executed as 'root'" fi - read -rp "Enter Name of Device to Install: " HOST warn "Disk will be Completely Wiped for Automatic Partitioning" read -rp "Do you want to Automatically Create the Partitions? (Y/N): " choice case $choice in @@ -150,6 +155,7 @@ in systemd-machine-id-setup --root=/mnt newline + read -rp "Enter Name of Device to Install: " HOST read -rp "Enter Path to Repository (path/URL): " URL if [ -z "$URL" ] then diff --git a/scripts/nixos.nix b/scripts/nixos.nix @@ -413,8 +413,9 @@ in fi echo "Cloning Repository..." - git clone --recurse-submodules ${path.repo} "$DIR" - pushd "$DIR" &> /dev/null; git config core.fileMode false; popd &> /dev/null + sudo git clone --recurse-submodules ${path.repo} "$DIR" + pushd "$DIR" &> /dev/null; sudo git config core.fileMode false; popd &> /dev/null + sudo chgrp -R keys "$DIR" newline read -rp "Enter Path to GPG Keys (path/.git): " KEY