install.sh: run as regular user
This commit is contained in:
parent
b12c436285
commit
362fdb41dd
1 changed files with 7 additions and 7 deletions
14
install.sh
14
install.sh
|
@ -17,7 +17,7 @@ fi
|
|||
lsblk
|
||||
echo -n "> what drive to install on? /dev/"
|
||||
read drive
|
||||
fdisk "/dev/$drive" << "EOF"
|
||||
sudo fdisk "/dev/$drive" << "EOF"
|
||||
o
|
||||
n
|
||||
p
|
||||
|
@ -28,16 +28,16 @@ a
|
|||
w
|
||||
EOF > /dev/null || exit 1
|
||||
echo "> created DOS partition table on $disk with one bootable partition."
|
||||
mkfs.ext4 $disk*1 || exit 1 # /dev/sda 1 or /dev/nvme0n1 p1 => *1 instead of just 1
|
||||
sudo mkfs.ext4 $disk*1 || exit 1 # /dev/sda 1 or /dev/nvme0n1 p1 => *1 instead of just 1
|
||||
echo "> formatted."
|
||||
mount $disk*1 /mnt || exit 1
|
||||
sudo mount $disk*1 /mnt || exit 1
|
||||
echo "> mounted."
|
||||
cd /mnt/etc/nixos
|
||||
echo "> installing git"
|
||||
nix-env -i git > /dev/null || exit 1
|
||||
echo "> downloading tudbut/nix-setup"
|
||||
git clone https://git.tudbut.de/tudbut/nix-setup
|
||||
rm configuration.nix
|
||||
pushd ; mv $(ls -a) .. ; popd
|
||||
sudo git clone https://git.tudbut.de/tudbut/nix-setup
|
||||
sudo rm configuration.nix
|
||||
pushd nix-setup ; sudo mv $(ls -a) .. ; popd
|
||||
echo "> initializing"
|
||||
bash init.sh
|
||||
sudo bash init.sh
|
||||
|
|
Loading…
Add table
Reference in a new issue