Skip to content

evian2389/guix-system

 
 

Repository files navigation

Installation

Partitioning

Note, most of the commands related to partitioning will require root priveleges. Prefix them with sudo or issue them from priviledged user shell.

Some theory and concepts behind btrfs: https://fedoramagazine.org/working-with-btrfs-general-concepts/

  1. Enter environment, where all needed tools are available guix shell parted cryptsetup btrfs-progs.
  2. List all devices with parted -l. Find appropriate one, save to variable $DISK, for example DISK=/dev/sda.
  3. Make a partition table, it’s very likely you need GPT (aka GUID Partition Table) and not MBR: parted $DISK

4.

guix shell parted git make #btrfs-progfs
sudo parted -l
DISK=/dev/sda
# or
# DISK=/dev/nvme0n1
sudo parted $DISK
# it will open a parted prompt
mklabel gpt
# 1GiB is a safe size for EFI partition, but you probably will be fine
# with much smaller, do your research on this topic
mkpart "EFI system partition" fat32 0% 1024MiB
set 1 esp on
mkpart primary 1024MiB 100%

sudo -s
mkfs.fat -F32 /dev/sda1

#cryptsetup luksFormat --type luks1 /dev/sda2
# Need to explore and probably fix luks2 support
# cryptsetup luksFormat --type luks2 --pbkdf pbkdf2 /dev/sda2
#cryptsetup luksDump
# UUID: 6243841f-4171-43dd-8e0b-93bddd56daaa

#cryptsetup luksOpen /dev/sda2 enc

mkfs.btrfs /dev/mapper/enc
# UUID: 92ce490b-5802-431c-8bc2-2451c3c67d3a

mkdir -p /mnt/ssd
mount /dev/mapper/enc /mnt/ssd

cd /mnt/ssd
btrfs subvolume create @
btrfs subvolume create @boot
btrfs subvolume create @home
btrfs subvolume create @gnu
btrfs subvolume create @data
btrfs subvolume create @var_log
btrfs subvolume create @swap

btrfs subvolume snapshot -r @ blank@


# I have 32GB of RAM.
btrfs filesystem mkswapfile --size 64g --uuid clear @swap/swapfile

# https://wiki.archlinux.org/title/btrfs#Swap_file

mount -o subvol=root /dev/mapper/enc /mnt

mkdir {boot,boot/efi,home,gnu,data,var,var/log,opt,swap}

herd start cow-store /mnt

# to write intermediate build results to actual drive
# instead of r/o or in-memory fs
export TMPDIR=/mnt/data/rde/tmp
mkdir -p $TMPDIR

blkid /dev/blablabla

make ser8/system/init

for vsclient

distrobox-enter -n ubuntu – sudo apt-get update

distrobox-enter -n ubuntu – sudo apt-get install qtwayland5

About

guix system configuration

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • GLSL 89.9%
  • Lua 5.9%
  • Shell 1.6%
  • Emacs Lisp 1.3%
  • Scheme 0.8%
  • C 0.3%
  • Other 0.2%