diff --git a/operating-systems/buer.scm b/operating-systems/buer.scm index 32dfe49..d085235 100644 --- a/operating-systems/buer.scm +++ b/operating-systems/buer.scm @@ -121,7 +121,8 @@ (kernel linux-libre-6.11) (kernel-arguments - (cons* "modprobe.blacklist=usbmouse,usbkbd,pcspkr" + (cons* "resume=/swap/swapfile" + "modprobe.blacklist=usbmouse,usbkbd,pcspkr" "thinkpad_acpi.fan_control=1" (filter (negate ((on disjoin (partial partial string-prefix?)) @@ -131,7 +132,12 @@ (file-systems (append file-system:volumes file-system:persistent-directories)) - + (swap-devices + (list (swap-space + (target "/swap/swapfile") + (dependencies + (filter (file-system-mount-point-predicate "/swap") + file-systems))))) (users (cons* user:radio user:root @@ -277,6 +283,7 @@ #|Memory management services|# (service zram-device-service-type (zram-device-configuration + (priority 100) (size (* 2 (ram-total))) (compression-algorithm 'lz4))) diff --git a/operating-systems/buer/file-systems.scm b/operating-systems/buer/file-systems.scm index db381c4..22daafb 100644 --- a/operating-systems/buer/file-systems.scm +++ b/operating-systems/buer/file-systems.scm @@ -112,6 +112,17 @@ (needed-for-boot? #t) (options "mode=0755")) + #|swap|# + (file-system + (device partition:guix) + (type "btrfs") + (mount-point "/swap") + (check? #f) + (needed-for-boot? #t) + (options (format #f "subvol=@swap,~ + discard=async,~ + ssd"))) + #|home|# (file-system (device partition:guix)