mirror of https://codeberg.org/anemofilia/zero
43 lines
1014 B
Plaintext
43 lines
1014 B
Plaintext
set -exu
|
|
|
|
# Mounting
|
|
mount -L guix /mnt
|
|
|
|
cd /mnt
|
|
for dir in boot root home var/log var/guix gnu/persist gnu/store; do
|
|
mkdir -p $dir; btrfs subvolume create @$dir; mount --bind @$dir $dir
|
|
done
|
|
|
|
cd @gnu/persist
|
|
mkdir -p /etc/guix /etc/ssh /etc/wireguard
|
|
cd
|
|
|
|
# Connection
|
|
rfkill unblock wifi
|
|
wpa_supplicant -B -i wlp2s0 -c <(wpa_passphrase 'AP24' 'Floresta123@')
|
|
dhclient
|
|
|
|
# Initialization
|
|
guix shell git -- git clone codeberg.org/anemofilia/radix
|
|
guix shell git -- git clone codeberg.org/anemofilia/zero
|
|
|
|
export GUILE_LOAD_PATH="zero:zero/operating-systems:radix:$GUILE_LOAD_PATH"
|
|
guix system init zero/operating-systems/buer.scm /mnt
|
|
|
|
# Cleaning
|
|
cd /mnt
|
|
for dir in boot root home var/log var/guix gnu/persist gnu/store; do
|
|
umount $dir; rm -rf $dir
|
|
done
|
|
|
|
# Populate
|
|
guix shell dbus -- dbus-uuidgen > @gnu/persist/etc/machine-id
|
|
cp -r /etc/ssh/* @gnu/persist/etc/ssh
|
|
cp -r /etc/guix/* @gnu/persist/etc/guix
|
|
|
|
# Permissions
|
|
chmod 700 @root
|
|
cd @gnu/persist/etc/
|
|
chmod 644 machine-id
|
|
chmod 600 guix ssh wireguard
|