mirror of
https://gitlab.univ-nantes.fr/glicid-public/guix-glicid.git
synced 2025-05-01 14:45:39 +02:00
adding munge, slurmdbd and slurmctld
This commit is contained in:
parent
610093e9d0
commit
965f424a55
2 changed files with 239 additions and 0 deletions
70
glicid/services/file-systems.scm
Normal file
70
glicid/services/file-systems.scm
Normal file
|
@ -0,0 +1,70 @@
|
|||
(define-module (glicid services file-systems)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (gnu services shepherd)
|
||||
#:use-module (guix)
|
||||
#:use-module (guix records)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (gnu packages file-systems)
|
||||
#:export (
|
||||
%default-autofs-conf
|
||||
autofs-configuration
|
||||
autofs-configuration?
|
||||
autofs-service
|
||||
autofs-service-type
|
||||
)
|
||||
)
|
||||
|
||||
(define %default-autofs-conf
|
||||
(plain-file "autofs" "
|
||||
# Empty file as we do nothing by default
|
||||
")
|
||||
)
|
||||
|
||||
(define-record-type* <autofs-configuration>
|
||||
autofs-configuration make-autofs-configuration
|
||||
autofs-configuration?
|
||||
(config-file autofs-config-file
|
||||
(default %default-autofs-conf)
|
||||
)
|
||||
(log-file autofs-log-file
|
||||
(default "/var/log/autofs.log")
|
||||
)
|
||||
)
|
||||
|
||||
(define autofs-service
|
||||
(match-lambda
|
||||
(($ <autofs-configuration> config-file log-file)
|
||||
(list
|
||||
(shepherd-service
|
||||
(provision '(autofs) )
|
||||
(documentation "Run autofs.")
|
||||
(requirement '(user-processes))
|
||||
(respawn? #f)
|
||||
(one-shot? #t)
|
||||
(start #~(make-forkexec-constructor
|
||||
(list
|
||||
#$(file-append autofs "/sbin/automount")
|
||||
"-d" "-f"
|
||||
)
|
||||
#:log-file #$log-file
|
||||
))
|
||||
(stop #~(make-kill-destructor))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define autofs-service-type
|
||||
(service-type (name 'autofs)
|
||||
(extensions
|
||||
(list (
|
||||
service-extension
|
||||
shepherd-root-service-type
|
||||
autofs-service
|
||||
))
|
||||
)
|
||||
(description "Run autofs")
|
||||
)
|
||||
)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue