diff --git a/glicid/services/parallel.scm b/glicid/services/parallel.scm index f4959ba..518f8ec 100644 --- a/glicid/services/parallel.scm +++ b/glicid/services/parallel.scm @@ -5,6 +5,7 @@ #:use-module (guix records) #:use-module (ice-9 match) #:use-module (gnu packages parallel) + #:use-module (glicid system file-systems) #:export ( munged-configuration munged-configuration? diff --git a/glicid/system/file-systems.scm b/glicid/system/file-systems.scm new file mode 100644 index 0000000..abb4179 --- /dev/null +++ b/glicid/system/file-systems.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") + ) + ) + ) +) +