Skip to content
Snippets Groups Projects
Verified Commit 9bcbd03b authored by Reza Housseini's avatar Reza Housseini
Browse files

feat: add guix-publish capability to master

parent 8c955495
No related branches found
No related tags found
No related merge requests found
......@@ -15,9 +15,44 @@
path: /etc/systemd/system/guix-daemon.service
regexp: '^ --build-users-group=guixbuild --discover=yes'
line: --build-users-group=guixbuild --discover=yes --listen=/var/guix/daemon-socket/socket --listen=0.0.0.0
- name: Generate key for publishing
ansible.builtin.shell:
cmd: guix archive --generate-key
creates: /etc/guix/signing-key.pub
- name: Create guix publish service file
ansible.builtin.copy:
dest: /etc/systemd/system/guix-publish.service
content: |
# This is a "service unit file" for the systemd init system to launch
# 'guix publish'. Drop it in /etc/systemd/system or similar to have
# 'guix publish' automatically started.
[Unit]
Description=Publish the GNU Guix store
Requires=guix-daemon.service
PartOf=guix-daemon.service
After=guix-daemon.service
[Service]
ExecStart=/var/guix/profiles/per-user/root/current-guix/bin/guix publish --user=nobody --port=8181
Environment='GUIX_LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale' LC_ALL=en_US.utf8
StandardOutput=syslog
StandardError=syslog
# Despite the name, this is rate-limited: a broken daemon will eventually fail.
Restart=always
# See <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00608.html>.
TasksMax=1024
[Install]
WantedBy=multi-user.target
- name: Restart guix-daemon
ansible.builtin.shell:
cmd: systemctl restart guix-daemon.service
- name: Start and enable guix-publish
ansible.builtin.shell:
cmd: systemctl start guix-publish && systemctl enable guix-publish
- name: Create symbolic link on nodes
ansible.builtin.shell:
cmd: cexec 'ln -sf /var/guix/profiles/per-user/root/current-guix/bin/guix /usr/local/bin/guix'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment