aboutsummaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
authorJosselin Poiret <dev@jpoiret.xyz>2021-11-15 20:26:27 +0000
committerLudovic Courtès <ludo@gnu.org>2021-11-23 10:24:27 +0100
commit133a61ae263520378ac44482810d7adecfb017d9 (patch)
treefd63933093c1c85a088571bafa64c3d1ca257406 /gnu/system
parentc984076a7df5f24d0c1d1d02343a845171b111f6 (diff)
downloadguix-133a61ae263520378ac44482810d7adecfb017d9.tar
guix-133a61ae263520378ac44482810d7adecfb017d9.tar.gz
system: Rework swap space support, add dependencies.
* gnu/system/file-systems.scm (swap-space): Add it. * gnu/system.scm (operating-system)[swap-devices]: Update comment. * gnu/services/base.scm (swap-space->shepherd-service-name, swap-deprecated->shepherd-service-name, swap->shepherd-service-name): Add them. * gnu/services/base.scm (swap-service-type, swap-service): Use the new records. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/file-systems.scm18
1 files changed, 17 insertions, 1 deletions
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index c6c1b96d16..027df7e966 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -97,7 +97,12 @@
%store-mapping
%network-configuration-files
- %network-file-mappings))
+ %network-file-mappings
+
+ swap-space
+ swap-space?
+ swap-space-target
+ swap-space-dependencies))
;;; Commentary:
;;;
@@ -712,4 +717,15 @@ subvolume name is unknown."))
(G_ "Use the @code{subvol} Btrfs file system option."))))))))
+;;;
+;;; Swap space
+;;;
+
+(define-record-type* <swap-space> swap-space make-swap-space
+ swap-space?
+ this-swap-space
+ (target swap-space-target)
+ (dependencies swap-space-dependencies
+ (default '())))
+
;;; file-systems.scm ends here