diff options
| author | brian cully <bjc@spork.org> | 2026-05-19 19:22:48 -0400 |
|---|---|---|
| committer | brian cully <bjc@spork.org> | 2026-05-19 19:22:48 -0400 |
| commit | 2d8b0700fff2dcc9d674ad340bd6524847cd2a53 (patch) | |
| tree | 098b72d69dd6bc1382283feeb34f7c6679b33a41 | |
| parent | 55ff45523e7a8309bba9d14bc08e3f5af6528669 (diff) | |
| download | guix-impermanence-init-2d8b0700fff2dcc9d674ad340bd6524847cd2a53.tar.gz guix-impermanence-init-2d8b0700fff2dcc9d674ad340bd6524847cd2a53.zip | |
many updates
| -rw-r--r-- | configuration.scm | 45 | ||||
| -rw-r--r-- | readme.org | 47 |
2 files changed, 53 insertions, 39 deletions
diff --git a/configuration.scm b/configuration.scm index 10c2023..9c5dd63 100644 --- a/configuration.scm +++ b/configuration.scm @@ -6,8 +6,7 @@ (mount-point "/") (needed-for-boot? #t) (device "tmpfs") - (type "tmpfs") - (check? #f))) + (type "tmpfs"))) (define gnufs (file-system @@ -16,34 +15,33 @@ (create-mount-point? #t) (type "btrfs") (device (file-system-label "root")) - (options "subvol=/gnu,compress=zstd,discard=async"))) + (options "subvol=/gnu,compress=zstd"))) -(define persistfs +(define etcfs (file-system - (mount-point "/persist") + (mount-point "/etc") (needed-for-boot? #t) (create-mount-point? #t) (type "btrfs") (device (file-system-label "root")) - (options "subvol=/persist,compress=zstd,discard=async"))) + (options "subvol=/gnu/etc,compress=zstd"))) -(define etcfs +(define varfs (file-system - (mount-point "/etc") + (mount-point "/var") (needed-for-boot? #t) (create-mount-point? #t) (type "btrfs") (device (file-system-label "root")) - (options "subvol=/persist/etc,compress=zstd,discard=async"))) + (options "subvol=/gnu/var,compress=zstd"))) -(define varfs +(define persistfs (file-system - (mount-point "/var") - (needed-for-boot? #t) + (mount-point "/persist") (create-mount-point? #t) (type "btrfs") (device (file-system-label "root")) - (options "subvol=/persist/var,compress=zstd,discard=async"))) + (options "subvol=/persist,compress=zstd"))) (define bootfs (file-system @@ -51,7 +49,7 @@ (create-mount-point? #t) (type "btrfs") (device (file-system-label "root")) - (options "subvol=/persist/boot,compress=zstd,discard=async"))) + (options "subvol=/gnu/boot,compress=zstd"))) (define homefs (file-system @@ -59,23 +57,22 @@ (create-mount-point? #t) (type "btrfs") (device (file-system-label "root")) - (options "subvol=/persist/home,compress=zstd,discard=async"))) + (options "subvol=/persist/home,compress=zstd"))) (define my-file-systems (list - rootfs gnufs - persistfs - - etcfs + ;; not needed in general case + ;; etcfs varfs + persistfs bootfs homefs (file-system - (mount-point "/boot/efi") + (mount-point "/boot/esp") (create-mount-point? #t) (dependencies (list bootfs)) (device (file-system-label "ESP")) @@ -94,16 +91,14 @@ (create-mount-point? "1777") (device "tmpfs") (type "tmpfs") - (flags '(no-suid no-dev)) - (check? #f)) + (flags '(no-suid no-dev))) (file-system (mount-point "/var/guix/temproots") (create-mount-point? #t) (device "tmpfs") (type "tmpfs") - (flags '(no-suid no-dev)) - (check? #f)))) + (flags '(no-suid no-dev))))) (operating-system (locale "en_US.utf8") @@ -133,7 +128,7 @@ (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) - (targets (list "/boot/efi")) + (targets (list "/boot/esp")) (keyboard-layout keyboard-layout))) (swap-devices '()) @@ -1,27 +1,46 @@ +* from existing install +need ~parted~ and ~btrfs-progs~ +: guix shell parted btrfs-progs + * partition disk gpt, 3 partitions: - 1 :: esp 2GB - 2 :: swap 8GB - 3 :: linux-fs rest +first create the partition table with ~cfdisk~, using ~gpt~ labels +: cfdisk /dev/vdb + +turn on the ‘esp’ flag for partition ~1~: +: parted /dev/vdb set 1 esp on + * create filesystems -: mkfs.vfat -L ESP -F 32 /dev/vda1 +: mkfs.vfat -n ESP -F 32 /dev/vdb1 -: mkfs.btrfs -L root /dev/vda3 -: btrfs subvol create /dev/vda3 /gnu -: btrfs subvol create /dev/vda3 /persist -: btrfs subvol create /dev/vda3 /persist/etc -: btrfs subvol create /dev/vda3 /persist/var -: btrfs subvol create /dev/vda3 /persist/home -: btrfs subvol create /dev/vda3 /persist/boot +: mkfs.btrfs -L root /dev/vdb3 +: mount -m -t btrfs /dev/vdb3 /mnt + +: btrfs subvol create /mnt/gnu +: btrfs subvol create /mnt/gnu/store +# : btrfs subvol create /mnt/gnu/etc +: btrfs subvol create /mnt/gnu/var +: btrfs subvol create /mnt/gnu/boot +: btrfs subvol create /mnt/persist +: btrfs subvol create /mnt/persist/home +: btrfs subvol create /mnt/persist/home/root + +: umount /mnt * mount filesystems -: mkdir /mnt -: mount -t tmpfs tmpfs /mnt +: mount -m -t tmpfs tmpfs /mnt : mount -m -t btrfs -o subvol=/gnu LABEL=root /mnt/gnu +# : mount -m -t btrfs -o subvol=/gnu/etc LABEL=root /mnt/etc +: mount -m -t btrfs -o subvol=/gnu/var LABEL=root /mnt/var +: mount -m -t btrfs -o subvol=/gnu/boot LABEL=root /mnt/boot : mount -m -t btrfs -o subvol=/persist LABEL=root /mnt/persist -: mount -m -t btrfs -o subvol=/persist/etc LABEL=root /mnt/etc -: mount -m -t btrfs -o subvol=/persist/var LABEL=root /mnt/var : mount -m -t btrfs -o subvol=/persist/home LABEL=root /mnt/home -: mount -m -t btrfs -o subvol=/persist/boot LABEL=root /mnt/boot -: mount -m -t vfat LABEL=ESP /mnt/boot/efi +: mount -m --bind /mnt/home/root /mnt/root +: mount -m -t vfat LABEL=ESP /mnt/boot/esp + +* init system +: guix system init configuration.scm /mnt |
