aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-08-22 06:23:03 -0300
committerEuAndreh <eu@euandre.org>2024-08-22 06:23:03 -0300
commitf28ca55d5316bd51c5f7a79375605aee5ca240d0 (patch)
tree82dcbfb22d5d20449f860657401f45df05548339
parentsystem.scm: Only reorder (swap-devices ...) with (file-systems ...) (diff)
downloadserver-f28ca55d5316bd51c5f7a79375605aee5ca240d0.tar.gz
server-f28ca55d5316bd51c5f7a79375605aee5ca240d0.tar.xz
system.scm: Add 8GiB /swapfile
-rw-r--r--src/guix/system.scm12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/guix/system.scm b/src/guix/system.scm
index 4df668e..3a78ddc 100644
--- a/src/guix/system.scm
+++ b/src/guix/system.scm
@@ -173,5 +173,17 @@
(swap-devices
(list
(swap-space
+ ;; # rm -f /swapfile
+ ;; # truncate -s 0 /swapfile
+ ;; # chattr +C /swapfile
+ ;; # fallocate -l 8G /swapfile
+ ;; # chmod 600 /swapfile
+ ;; # mkswap /swapfile
+ ;; # swapon /swapfile
+ (target "/swapfile")
+ (dependencies
+ (filter (file-system-mount-point-predicate "/")
+ file-systems)))
+ (swap-space
(target
(uuid "94b47d91-3542-438a-84a9-859fe347ce09"))))))