This configuration contains linux-nonfree kernel.
Forgive me Stallman for I have sinned.
cfdisk /dev/sda
The root partition is encrypted with LUKS.
/dev/sda1 | /boot/efi | FAT | 63MB |
/dev/sda2 | / | BTRFS+LUKS | 20GB |
mkfs.fat /dev/sda1
cryptsetup luksFormat /dev/sda2
cryptsetup open /dev/sda2 root
mkfs.btrfs -L root /dev/mapper/root
mount /dev/mapper/root /mnt
mkdir -p /mnt/boot/efi
mount /dev/sda1 /mnt/boot/efi
mkdir /mnt/var
truncate -s 0 /mnt/var/swapfile
chattr +C /mnt/var/swapfile
fallocate -l 8G /mnt/var/swapfile
chmod 600 /mnt/var/swapfile
mkswap /mnt/var/swapfile
ip link set eth0 up
dhclient eth0
herd start ssh-daemon
cp -r guix-config /mnt/etc
herd start cow-store /mnt
guix system init /mnt/etc/guix-config/meiyu/systems/minimal.scm /mnt
Reboot into the Guix system.
guix pull
Reconfigure the minimal system to a full Guix system.
export GUILE_LOAD_PATH=/etc/guix-config:$GUILE_LOAD_PATH
guix system reconfigure /etc/guix-config/meiyu/systems/captain.scm
Do this with root
user account because sudo
does not work after
replacing /etc
.
Build the Guix system.
guix system build config.scm
Clean up /etc
.
mv /etc /old-etc
mkdir /etc
cp -r /old-etc/{guix,passwd,group,shadow,mtab,services} /etc
Install the Guix system.
guix system reconfigure config.scm
Reboot into the Guix system.
reboot
export GUILE_LOAD_PATH=/etc/guix-config:$GUILE_LOAD_PATH
guix package -m /etc/guix-config/meiyu/packages/captain-packages.scm