[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
modular shepherd config
From: |
Efraim Flashner |
Subject: |
modular shepherd config |
Date: |
Fri, 10 Apr 2020 00:20:55 +0300 |
A while ago I split my personal shepherd init.scm into a bunch of files
and I wanted to document it somewhere for others to see also. Any
suggestion where I should put it? Shepherd manual? guix-cookbook?
(ins)efraim@E5400 ~$ tree .config/shepherd/
.config/shepherd/
├── init.d
│ ├── dropbox.scm
│ ├── fccache.scm
│ ├── gnupg.scm
│ ├── guix.scm
│ ├── kdeconnect.scm
│ ├── mbsync.scm
│ ├── syncthing.scm
│ └── vdirsyncer.scm
├── init.scm
└── shepherd.log
(ins)efraim@E5400 ~$ cat .config/shepherd/init.scm
(use-modules (shepherd service)
((ice-9 ftw) #:select (scandir)))
;; Load all the files in the directory 'init.d' with a suffix '.scm'.
(for-each
(lambda (file)
(load (string-append "init.d/" file)))
(scandir (string-append (dirname (current-filename)) "/init.d")
(lambda (file)
(string-suffix? ".scm" file))))
;; Send shepherd into the background
(action 'shepherd 'daemonize)
--
Efraim Flashner <address@hidden> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
signature.asc
Description: PGP signature
- modular shepherd config,
Efraim Flashner <=