guix.yml 2.04 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
- name: Guix pull everywhere.
  command:
Todor Kondic's avatar
...    
Todor Kondic committed
29
    cmd: /usr/bin/bash -l -c 'guix pull -c6 -C /home/{{ item.login }}/.config/guix/channels.scm'
30
31
32
  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

Todor Kondic's avatar
Todor Kondic committed
47
48
49
50
51
52
53
- 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
54
# - name: Install PCL packages.
Todor Kondic's avatar
Todor Kondic committed
55
#   command:
Todor Kondic's avatar
...    
Todor Kondic committed
56
#     cmd: guix package -c8 -m /etc/guix_manifest_pcl.scm --fallback -p ~/.pcl-guix-prof
Todor Kondic's avatar
Todor Kondic committed
57
58
#   tags: guix-inst-pkg
#   become_user: "{{ item.login }}"
Todor Kondic's avatar
...    
Todor Kondic committed
59
#   become_flags: "-i"
Todor Kondic's avatar
Todor Kondic committed
60
61
62
63
#   retries: 20
#   delay: 5
#   register: result
#   until: result.rc == 0
Todor Kondic's avatar
Todor Kondic committed
64
#   loop: "{{ users }}"
Todor Kondic's avatar
Todor Kondic committed
65

Todor Kondic's avatar
...    
Todor Kondic committed
66
67
68
69
70
71
72
73
74
- 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
75
  loop: "{{ users }}"
Todor Kondic's avatar
...    
Todor Kondic committed
76
77
78
79
80
81
82
83
84
85

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