- name: Get the GPG key to authenticate GNU Guix. ansible.builtin.command: cmd: sh -c 'wget ''https://sv.gnu.org/people/viewgpg.php?user_id=15145'' -qO - | sudo -i gpg --import - && touch /etc/guix.key.fetched' creates: /etc/guix.key.fetched - name: Copy the guix install script. ansible.builtin.copy: src: files/etc/installguix.sh dest: /etc/installguix.sh owner: root group: root mode: '0744' - name: Run the guix install script. shell: yes | /etc/installguix.sh args: warn: no creates: /var/guix/profiles/per-user/root/current-guix/bin/guix - name: Create .config/guix. file: path: "/home/{{ item['login'] }}/.config/guix" state: directory recurse: yes force: no become_user: "{{ item['login'] }}" loop: "{{ users }}" ignore_errors: yes - name: Copy channels. copy: src: files/home/user/.config/guix/channels.scm dest: "/home/{{ item.login }}/.config/guix/channels.scm" become_user: "{{ item.login }}" loop: "{{ users }}" - name: Guix pull everywhere. command: cmd: /usr/bin/bash -l -c 'guix pull' become_user: "{{ item.login }}" loop: "{{ users }}" tags: guix-pull - name: Run guix pull as root. tags: guix-pull command: cmd: guix pull - name: Copy package manifest. copy: src: files/etc/guix_manifest.scm dest: /etc/guix_manifest.scm tags: guix-inst-pkg - name: Copy "new shinyscreen" package manifest. copy: src: files/etc/guix_new_shinyscreen_manifest.scm dest: /etc/guix_new_shinyscreen_manifest.scm tags: guix-inst-pkg - name: Install packages. command: cmd: /usr/bin/bash -l -c 'guix package -c4 -m /etc/guix_manifest.scm --fallback' tags: guix-inst-pkg become_user: "{{ item.login }}" retries: 20 delay: 5 register: result until: result.rc == 0 loop: "{{ users }}" - name: Create new shinyscreen profile. command: cmd: > /usr/bin/bash -l -c 'guix package -c4 -m /etc/guix_new_shinyscreen_manifest.scm -p "/home/{{ item.login }}/.prof-ss" --fallback' tags: guix-inst-pkg become_user: "{{ item.login }}" retries: 20 delay: 5 register: result until: result.rc == 0 loop: "{{ users }}"