guix.yml 1.56 KB
Newer Older
Todor Kondic's avatar
Todor Kondic committed
1
2
3
4
5
- name: Create .config/guix.
  file:
    path: "/home/{{ item['login'] }}/.config/guix"
    state: directory
    recurse: yes
Todor Kondic's avatar
Todor Kondic committed
6
    force: no
Todor Kondic's avatar
Todor Kondic committed
7
8
  become_user: "{{ item['login'] }}"
  loop: "{{ users }}"
Todor Kondic's avatar
Todor Kondic committed
9
  ignore_errors: yes
Todor Kondic's avatar
Todor Kondic committed
10
11
12
13
14
15
16
17
    

- 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 }}"
Todor Kondic's avatar
Todor Kondic committed
18
19


20
- name: Copy nonfree channels.
Todor Kondic's avatar
Todor Kondic committed
21
  copy:
22
23
    src: files/home/user/.config/guix/channels-nonfree.scm
    dest: "/home/{{ item.login }}/.config/guix/channels-nonfree.scm"
Todor Kondic's avatar
Todor Kondic committed
24
25
  become_user: "{{ item.login }}"
  loop: "{{ users }}"
Todor Kondic's avatar
Todor Kondic committed
26
    
27
28
29
30
31
32
- name: Guix pull everywhere.
  command:
    cmd: /usr/bin/bash -l -c 'guix pull -c6'
  become_user: "{{ item.login }}"
  loop: "{{ users }}"
  tags: guix-pull
Todor Kondic's avatar
Todor Kondic committed
33
34
35



Todor Kondic's avatar
Todor Kondic committed
36
37
38
39
# - name: Run guix pull as root.
#   tags: guix-pull
#   command:
#     cmd: guix pull
Todor Kondic's avatar
Todor Kondic committed
40

41
42
43
44
45
- name: Copy package manifest.
  copy:
    src: files/etc/guix_manifest.scm
    dest: /etc/guix_manifest.scm
  tags: guix-inst-pkg
46

47
48
49
50
51
52
53
54
55
56
- name: Install packages.
  command:
    cmd: /usr/bin/bash -l -c 'guix package -c8 -m /etc/guix_manifest.scm --fallback -p ~/.man-guix-prof'
  tags: guix-inst-pkg
  become_user: "{{ item.login }}"
  retries: 20
  delay: 5
  register: result
  until: result.rc == 0
  loop: "{{ users }}"
Todor Kondic's avatar
Todor Kondic committed
57
58
59
60
61
62
63
64
65
66

# - name: Install guix managed programs.
#   tags: guix-copy-bin
#   copy:
#     src: files/home/user/.local/bin/
#     dest: "/home/{{ item.login }}/.local/bin"
#     mode: '0744'
#     owner: "{{ item.login }}"
#     group: "{{ item.login }}"
#   loop: "{{ users }}"