Created
September 13, 2022 09:10
-
-
Save kristianlm/627b0824e406ec7865d3ef70a1fc7930 to your computer and use it in GitHub Desktop.
Custom services in Guix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; I find it hard to read the Guix Manual and figure out how to make a custom shepherd service | |
;; that just keeps a process running. I came up with this and though it was a keeper: | |
(operating-system | |
… | |
(service (service-type | |
(name 'tmuxkirc') | |
(extensions | |
(list (service-extension | |
shepherd-root-service-type | |
(lambda* (config) | |
(list | |
(shepherd-service | |
(documentation "Run the klm daemon") | |
(provision '(tmuxkirc)) | |
(requirement '(user-processes networking)) | |
(start #~(make-forkexec-constructor | |
(list #$(file-append tmux "/bin/tmux") | |
"-f" #$(plain-file "tmux.conf" | |
" | |
set-option -g prefix ` | |
bind-key ` send-prefix | |
set-option -g history-limit 100000 | |
set -g set-titles on | |
set -g status-bg black | |
set -g status-fg white | |
") | |
"new-session" "-d" | |
#$(file-append kirc "/bin/kirc") | |
(string-append " -s irc.libera.chat -n guest437" | |
" -o kirc.txt -c chicken,guix,solvespace")) | |
#:pid-file "/var/run/kirc.pid")) | |
(stop #~(make-kill-destructor)))))))) | |
(default-value #f) | |
(description "foodidiooo"))) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment