Last active 1735311843

Fredrik's Avatar Fredrik revised this gist 1735311843. Go to revision

1 file changed, 85 insertions

endeavour.yaml(file created)

@@ -0,0 +1,85 @@
1 + - hosts: localhost
2 + become: True
3 + gather_facts: True
4 + vars:
5 + user: f
6 + tasks:
7 + # Config stuff, some apply once, some more, will probably break when we keep rolling
8 + - name: Paralell downloads increase from standard (this will only work once, fix later)
9 + ansible.builtin.replace:
10 + path: /etc/pacman.conf
11 + # regexp: '^#?ParallelDownloads = 5$'
12 + regexp: '^#?ParallelDownloads = \d+$'
13 + replace: 'ParallelDownloads = 33'
14 + - name: Create /etc/NetworkManager/conf.d/20-connectivity.conf with connectivity disabled
15 + ansible.builtin.file:
16 + path: /etc/NetworkManager/conf.d
17 + state: directory
18 + mode: '0755'
19 +
20 + - name: Ensure MAKEFLAGS is set to use all available cores
21 + lineinfile:
22 + path: /etc/makepkg.conf
23 + regexp: '^MAKEFLAGS='
24 + line: 'MAKEFLAGS="-j$(nproc)"'
25 + state: present
26 +
27 + - name: Ensure COMPRESS is set to gzip
28 + lineinfile:
29 + path: /etc/makepkg.conf
30 + regexp: '^COMPRESS='
31 + line: 'COMPRESS="gzip"'
32 + state: present
33 + - name: Ensure PKGEXT is set to .pkg.tar.gz
34 + lineinfile:
35 + path: /etc/makepkg.conf
36 + regexp: '^PKGEXT='
37 + line: 'PKGEXT=".pkg.tar.gz"'
38 + state: present
39 +
40 + - name: Ensure yay config directory exists
41 + file:
42 + path: /home/{{ user }}/.config/yay
43 + state: directory
44 + mode: '0755'
45 + owner: "{{ user }}" # Ensure ownership
46 + group: "{{ user }}" # Ensure group ownership
47 +
48 + - name: Ensure yay config file exists
49 + copy:
50 + dest: /home/{{ user }}/.config/yay/config.json
51 + content: |
52 + {
53 + "sudoloop": true
54 + }
55 + mode: '0644'
56 + owner: "{{ user }}" # Ensure ownership
57 + group: "{{ user }}" # Ensure group ownership
58 +
59 + - name: Update yay config to add sudoloop
60 + lineinfile:
61 + path: /home/{{ user }}/.config/yay/config.json
62 + regexp: '"sudoloop":'
63 + line: '"sudoloop": true'
64 + state: present
65 + owner: "{{ user }}" # Ensure ownership
66 + group: "{{ user }}" # Ensure group ownership # FYI
67 + # /etc/NetworkManager/conf.d/20-connectivity.conf
68 + # overwrites
69 + # /usr/lib/NetworkManager/conf.d/20-connectivity.conf
70 + # Both is probably maybe being overwritten sometimes by pacman
71 + - name: Disable NetworkManager connectivity checks
72 + ansible.builtin.copy:
73 + dest: /etc/NetworkManager/conf.d/20-connectivity.conf
74 + content: |
75 + [connectivity]
76 + uri=http://ping.archlinux.org/nm-check.txt
77 + enabled=false
78 + mode: '0644'
79 +
80 + - name: Clone GitHub Copilot Vim repository ({{ ansible_date_time.iso8601 }})
81 + ansible.builtin.git:
82 + repo: https://github.com/github/copilot.vim.git
83 + dest: /home/{{ user }}/.config/nvim/pack/github/start/copilot.vim
84 + update: true
85 + # :Copilot status in vim etc
Newer Older