From 17406a204f0751467d0e36a266648bb31d2134e3 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Wed, 31 Jul 2024 01:28:51 +0200 Subject: feat(systems)!: implement swap support --- machines/portable-bios.scm | 11 +++++++++++ systems/mcdowell.scm | 2 ++ 2 files changed, 13 insertions(+) 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* -- cgit v1.2.3