From cda8e4954a1d396004331e13fb383744c1d27154 Mon Sep 17 00:00:00 2001 From: JEAN-FRANCOIS GUILLAUME Date: Sat, 14 May 2022 19:10:12 +0200 Subject: [PATCH] forgot to add file-system.scm --- glicid/system/file-system.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 glicid/system/file-system.scm diff --git a/glicid/system/file-system.scm b/glicid/system/file-system.scm new file mode 100644 index 0000000..abb4179 --- /dev/null +++ b/glicid/system/file-system.scm @@ -0,0 +1,32 @@ +(define-module (glicid system file-systems) + #:use-module (gnu system file-systems) + #:export (%control-groups) +) + +(define %control-groups + (let + ((parent (file-system + (device "cgroup") + (mount-point "/sys/fs/cgroup") + (type "tmpfs") + (check? #f) + ))) + (cons parent + (map (lambda (subsystem) + (file-system + (device "cgroup") + (mount-point (string-append "/sys/fs/cgroup/" subsystem)) + (type "cgroup") + (check? #f) + (options subsystem) + (create-mount-point? #t) + (dependencies (list parent)) + ) + ) + '("blkio" "cpu" "cpuacct" "cpuset" "devices" "freezer" "hugetlb" + "memory" "net_cls" "net_prio" "perf_event" "pids" "rdma" "unified") + ) + ) + ) +) +