Add config for services
This commit is contained in:
parent
6aea52cc84
commit
4f12639672
1 changed files with 58 additions and 0 deletions
|
@ -668,6 +668,64 @@ write_files:
|
|||
'(custom-enabled-themes '(modus-vivendi))
|
||||
'(package-selected-packages '(magit)))
|
||||
(custom-set-faces)
|
||||
- path: home/cl/.config/systemd/user/emacs.service
|
||||
owner: cl:cl
|
||||
defer: True
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Emacs text editor
|
||||
Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/local/bin/emacs --daemon
|
||||
ExecStop=/usr/local/bin/emacsclient --eval "(kill-emacs)"
|
||||
Environment=SSH_AUTH_SOCK=%t/keyring/ssh
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
||||
- path: /home/cl/create_hunchentoot_image.sh
|
||||
owner: cl:cl
|
||||
permissions: '0755'
|
||||
defer: True
|
||||
content: |
|
||||
sbcl --non-interactive \
|
||||
--load ~/start-hunchentoot.lisp \
|
||||
--eval '(sb-ext:save-lisp-and-die "hunchentoot.image" :toplevel #'start-server :executable t)'
|
||||
|
||||
- path: /home/cl/start-hunchentoot.lisp
|
||||
owner: cl:cl
|
||||
defer: True
|
||||
content: |
|
||||
(ql:quickload "hunchentoot")
|
||||
|
||||
(defun start-server (&key (port 8080))
|
||||
(hunchentoot:start (make-instance 'hunchentoot:easy-acceptor :port port)))
|
||||
|
||||
(hunchentoot:define-easy-handler (hello-html :uri "/hello") ()
|
||||
(setf (hunchentoot:content-type*) "text/html")
|
||||
(format nil "<!DOCTYPE html><html><head><title>Hello</title></head><body><h1>Hello, World!</h1></body></html>"))
|
||||
|
||||
(start-server :port 8080)
|
||||
|
||||
- path: /home/cl/.config/systemd/user/hunchentoot.service
|
||||
owner: cl:cl
|
||||
defer: True
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Hunchentoot Web Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=cl
|
||||
ExecStart=/home/cl/hunchentoot.image
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
runcmd:
|
||||
# Run Certbot to obtain SSL certificates and configure Nginx
|
||||
|
|
Loading…
Add table
Reference in a new issue