diff options
author | Marek Paśnikowski <marek@marekpasnikowski.pl> | 2024-07-31 01:28:51 +0200 |
---|---|---|
committer | Marek Paśnikowski <marek@marekpasnikowski.pl> | 2024-07-31 01:45:58 +0200 |
commit | 17406a204f0751467d0e36a266648bb31d2134e3 (patch) | |
tree | 34acbcb233e19581d42c337781afd69576be00dd | |
parent | 5b9934debe325a0b05e7ba99f01f20bd9db45125 (diff) |
feat(systems)!: implement swap support
-rw-r--r-- | machines/portable-bios.scm | 11 | ||||
-rw-r--r-- | systems/mcdowell.scm | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/machines/portable-bios.scm b/machines/portable-bios.scm index 334054d..6cee14a 100644 --- a/machines/portable-bios.scm +++ b/machines/portable-bios.scm @@ -6,6 +6,7 @@ #:use-module (gnu bootloader grub) ;; file-system + ;; swap-space #:use-module (gnu system file-systems) ;; linux @@ -53,3 +54,13 @@ ;; record* package (define-public kernel* linux) + +;; string -> +;; (list record* swap-space) +(define-public (swap-devices* host-name*) + (let* ((label* (string-append host-name* "-swap")) + + (target* (file-system-label label*)) + + (swap-space* (swap-space (target target*)))) + (list swap-space*))) diff --git a/systems/mcdowell.scm b/systems/mcdowell.scm index 6f0c47f..a51d627 100644 --- a/systems/mcdowell.scm +++ b/systems/mcdowell.scm @@ -8,6 +8,7 @@ ; hardware-groups ; initrd* ; kernel* + ; swap-devices* #:use-module (suweren system) ; %suweren-operating-system #:use-module (users id1000) ; uid1000-account ; uid1000-home-environment @@ -44,6 +45,7 @@ firmware* host-name* (file-systems* host-name*) + (swap-devices* host-name*) users* timezone* locale* |