Browse Source

install.sh

master
Juni Kim 3 years ago
parent
commit
00f92bbb00
  1. 25
      install.sh

25
install.sh

@ -0,0 +1,25 @@
#!/bin/bash
cfdisk /dev/sda || exit 1
mkfs.ext4 -L guix /dev/sda2 || exit 1
mount /dev/sda2 /mnt || exit 1
mkdir -p /mnt/etc || exit 1
herd start cow-store /mnt
read -rp "Hostname: " HOSTNAME
if test -z "$HOSTNAME"; then
echo "Empty hostname."
exit 1
fi
guix package -i git || exit 1
git clone https://git.junickim.me/junikimm717/guixconfigs || exit 1
cd guixconfigs || exit 1
sed -i "s/guixbox/$HOSTNAME/g" ./config.scm
cp ./config.scm /mnt/etc/
guix pull || exit 1
guix system init /mnt/etc/config.scm /mnt
Loading…
Cancel
Save