From b31b35a23ca5fd82d3e4438e453ee386700c0a00 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Sun, 15 Feb 2026 08:26:49 +0100 Subject: [PATCH] feat: add swap --- config.scm | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/config.scm b/config.scm index 1d79018ae3b6781f976a06da698b0390e1ba4e7e..cb3c946178cc907921b42bb125b32f06411b4406 100644 --- a/config.scm +++ b/config.scm @@ -158,6 +158,20 @@ dbus-root-service-type (list blueman)))) +(define crypted-root + (mapped-device + (source (uuid "55787ccb-decb-46b6-a190-6597dff68c68")) + (target "cryptedguix") + (type luks-device-mapping))) + +(define root-file-system + (file-system + (device (file-system-label "guix-root")) + ;; (device "/dev/mapper/cryptedguix") + (mount-point "/") + (type "ext4") + (dependencies (list crypted-root)))) + (define %ruther/base-laptop-os (operating-system (kernel linux-6.17) @@ -185,29 +199,25 @@ ;; Specify a mapped device for the encrypted root partition. ;; The UUID is that returned by 'cryptsetup luksUUID'. (mapped-devices - (list (mapped-device - (source (uuid "55787ccb-decb-46b6-a190-6597dff68c68")) - (target "cryptedguix") - (type luks-device-mapping)))) + (list crypted-root)) (file-systems (append - (list (file-system - (device (file-system-label "guix-root")) - ;; (device "/dev/mapper/cryptedguix") - (mount-point "/") - (type "ext4") - (dependencies mapped-devices)) + (list root-file-system (file-system (device (file-system-label "BOOT")) (mount-point "/boot") (type "vfat"))) %base-file-systems)) + (swap-devices + (list (swap-space + (target "/swapfile") + (dependencies (list root-file-system))))) + ;; Create user `bob' with `alice' as its initial password. (users (cons* %ruther/user %base-user-accounts)) - ;; Add the `students' group (groups %base-groups) (privileged-programs