Skip to content

Instantly share code, notes, and snippets.

@jboynyc
Last active December 10, 2020 09:40
Show Gist options
  • Save jboynyc/8dd056bd4836b9c0671cbe955ef63a1d to your computer and use it in GitHub Desktop.
Save jboynyc/8dd056bd4836b9c0671cbe955ef63a1d to your computer and use it in GitHub Desktop.
How to run ZNC and weechat-headless in containers
$ cat ~/.local/share/systemd/user/znc.service
[Unit]
Description=ZNC user server
After=network.target

[Service]
WorkingDirectory=%h
ExecStart=guix environment --ad-hoc --container --expose=/etc/ssl/certs -N \
  znc gnutls nss-certs -- \
  znc -f
Restart=always
RestartSec=3

[Install]
WantedBy=sockets.target
WantedBy=multi-user.target
$ systemctl --user daemon-reload
$ systemctl --user enable znc
$ systemctl --user start znc
$ systemctl --user status znc
$ sudo loginctl enable-linger `whoami`
$ cat ~/.local/share/systemd/user/weechat.service
[Unit]
Description=Weechat user server
After=znc.service

[Service]
WorkingDirectory=%h
ExecStart=guix environment --ad-hoc --container --expose=/etc/ssl/certs -N \
  weechat python-wrapper python-websocket-client gnutls nss-certs curl -- \
  weechat-headless
Restart=always
RestartSec=3

[Install]
WantedBy=sockets.target
WantedBy=multi-user.target
$ systemctl --user daemon-reload
$ systemctl --user enable weechat
$ systemctl --user start weechat
$ systemctl --user status weechat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment