guix.yml 2.09 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
55
56
- name: Copy package manifest (PCL).
  copy:
    src: files/etc/guix_manifest_pcl.scm
    dest: /etc/guix_manifest_pcl.scm
  tags: guix-inst-pkg


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

Todor Kondic's avatar
...    
Todor Kondic committed
69
70
71
72
73
74
75
76
77
- name: Install packages.
  command:
    cmd: 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
Todor Kondic's avatar
Todor Kondic committed
78
  loop: "{{ users }}"
Todor Kondic's avatar
...    
Todor Kondic committed
79
80
81
82
83
84
85
86
87
88

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