summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/guix.texi3
-rw-r--r--gnu/services/containers.scm13
2 files changed, 11 insertions, 5 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index cc6ad13d6c..caebe3b03c 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -41424,8 +41424,9 @@ BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"
Available @code{rootless-podman-configuration} fields are:
@table @asis
-@item @code{podman} (default: @code{podman}) (type: package)
+@item @code{podman} (default: @code{podman}) (type: package-or-#f)
The Podman package that will be installed in the system profile.
+Pass @code{#f} to not install Podman.
@item @code{group-name} (default: @code{"cgroup"}) (type: string)
The name of the group that will own /sys/fs/cgroup resources. Users that
diff --git a/gnu/services/containers.scm b/gnu/services/containers.scm
index d8f533f44c..a82fb64db3 100644
--- a/gnu/services/containers.scm
+++ b/gnu/services/containers.scm
@@ -64,10 +64,15 @@
(define list-of-subid-ranges?
(list-of subid-range?))
+(define (package-or-#f? val)
+ (or (not val)
+ (package? val)))
+
(define-configuration/no-serialization rootless-podman-configuration
(podman
- (package podman)
- "The Podman package that will be installed in the system profile.")
+ (package-or-#f podman)
+ "The Podman package that will be installed in the system profile.
+@code{#f} can be passed to suppress the installation.")
(group-name
(string "cgroup")
"The name of the group that will own /sys/fs/cgroup resources. Users that
@@ -107,8 +112,8 @@ available for each configured user."))
(define rootless-podman-service-profile
(lambda (config)
- (list
- (rootless-podman-configuration-podman config))))
+ (or (and=> (rootless-podman-configuration-podman config) list)
+ (list))))
(define rootless-podman-service-etc
(lambda (config)