pmeiyu / guix-config

guix

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Guix Operating System Configuration

Install Guix system

This configuration contains linux-nonfree kernel.

Forgive me Stallman for I have sinned.

Partition Disk

cfdisk /dev/sda

The root partition is encrypted with LUKS.

/dev/sda1/boot/efiFAT63MB
/dev/sda2/BTRFS+LUKS20GB
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

Create swap file on Btrfs

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

Setup network

ip link set eth0 up
dhclient eth0
herd start ssh-daemon

Copy configuration file

cp -r guix-config /mnt/etc

Install a minimal Guix system

herd start cow-store /mnt
guix system init /mnt/etc/guix-config/meiyu/systems/minimal.scm /mnt

Reboot

Reboot into the Guix system.

Update guix

guix pull

Reconfigure to a full Guix system

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

Replace an existing operating system with Guix system

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

Install Packages

export GUILE_LOAD_PATH=/etc/guix-config:$GUILE_LOAD_PATH
guix package -m /etc/guix-config/meiyu/packages/captain-packages.scm

About

guix


Languages

Language:Scheme 79.5%Language:Emacs Lisp 20.5%