guix.yml 2.16 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
  tags: guix-conf
Todor Kondic's avatar
Todor Kondic committed
11
12
13
14
15
16
17
18
    

- 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
19
  tags: guix-conf
Todor Kondic's avatar
Todor Kondic committed
20
21


22
- name: Copy nonfree channels.
Todor Kondic's avatar
Todor Kondic committed
23
  copy:
24
25
    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
26
27
  become_user: "{{ item.login }}"
  loop: "{{ users }}"
Todor Kondic's avatar
...    
Todor Kondic committed
28
  tags: guix-conf
Todor Kondic's avatar
Todor Kondic committed
29
    
30
31
- name: Guix pull everywhere.
  command:
Todor Kondic's avatar
...    
Todor Kondic committed
32
    cmd: /usr/bin/bash -l -c 'guix pull -c6 -C /home/{{ item.login }}/.config/guix/channels.scm'
33
34
35
  become_user: "{{ item.login }}"
  loop: "{{ users }}"
  tags: guix-pull
Todor Kondic's avatar
Todor Kondic committed
36
37
38



Todor Kondic's avatar
Todor Kondic committed
39
40
41
42
# - name: Run guix pull as root.
#   tags: guix-pull
#   command:
#     cmd: guix pull
Todor Kondic's avatar
Todor Kondic committed
43

44
45
46
47
48
- name: Copy package manifest.
  copy:
    src: files/etc/guix_manifest.scm
    dest: /etc/guix_manifest.scm
  tags: guix-inst-pkg
49

Todor Kondic's avatar
Todor Kondic committed
50
51
52
53
54
- name: Copy package manifest (PCL).
  copy:
    src: files/etc/guix_manifest_pcl.scm
    dest: /etc/guix_manifest_pcl.scm
  tags: guix-inst-pkg
55
  when: "'pcbuilders' in group_names"
Todor Kondic's avatar
Todor Kondic committed
56
57


58
59
- name: Install PCL packages.
  command:
Todor Kondic's avatar
...    
Todor Kondic committed
60
    cmd: bash -l -c 'guix package -c8 -m /etc/guix_manifest_pcl.scm --fallback -p ~/.pcl-guix-prof'
61
62
63
64
65
66
67
68
  tags: guix-inst-pkg
  become_user: "{{ item.login }}"
  retries: 20
  delay: 5
  register: result
  until: result.rc == 0
  loop: "{{ users }}"
  when: "'pcbuilders' in group_names"
Todor Kondic's avatar
Todor Kondic committed
69

Todor Kondic's avatar
...    
Todor Kondic committed
70
- name: Install Stations packages.
Todor Kondic's avatar
...    
Todor Kondic committed
71
  command:
Todor Kondic's avatar
...    
Todor Kondic committed
72
    cmd: bash -l -c 'guix package -c8 -m /etc/guix_manifest.scm --fallback -p ~/.man-guix-prof'
Todor Kondic's avatar
...    
Todor Kondic committed
73
74
75
76
77
78
  tags: guix-inst-pkg
  become_user: "{{ item.login }}"
  retries: 20
  delay: 5
  register: result
  until: result.rc == 0
Todor Kondic's avatar
Todor Kondic committed
79
  loop: "{{ users }}"
Todor Kondic's avatar
...    
Todor Kondic committed
80
81
82
83
84
85
86
87
88
89

# - 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 }}"