Skip to content

Commit 8378cab

Browse files
committed
Merge MR 'fix: make installation work again' into 'main'
See merge request el-capitano/dotfiles!467
2 parents 72e4b34 + 28e2f0b commit 8378cab

22 files changed

+336
-157
lines changed

NOTES.md

-35
This file was deleted.

README.md

+16-11
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,27 @@ sh -c "$(wget -qO- get.chezmoi.io) -- init --apply --verbose tmeijn"
2626
1. In a terminal, execute:
2727

2828
```bash
29-
sh -c "$(wget -qO- get.chezmoi.io) -- init --apply --verbose --exclude scripts tmeijn"
29+
sh -c "$(wget -qO- get.chezmoi.io) -- init --apply --exclude scripts tmeijn"
3030
```
3131

32-
1. Close the terminal and open a new terminal and execute:
32+
1. **Close the current terminal**
33+
1. Open a new terminal and execute:
3334

3435
```bash
35-
sh -c "$(wget -qO- get.chezmoi.io) -- init --apply --verbose tmeijn"
36+
export ANSIBLE_PASSWORD="<YOUR_SUDO_PASSWORD>"
37+
```
38+
39+
```bash
40+
sh -c "$(wget -qO- get.chezmoi.io) -- init --apply tmeijn"
3641
```
3742

3843
**note:** this might crash during installation. In that case open a new terminal and keep running `chezmoi apply`.
3944

40-
1. After reboot, unlock Bitwarden using `rbw unlock`
45+
1. After reboot, open a terminal and unlock Bitwarden using our `reco` alias
4146
1. Login to [`Atuin`](https://atuin.sh/):
4247

4348
```bash
44-
atuin login -u zero-mass92 -p $(rbw get "Atuin Sync") -k "$(rbw get "Atuin Sync" -f Key)"
49+
atuin login -u zero-mass92 -p $(rbw get "Atuin Sync") -k "$(rbw get "Atuin Sync" -f Key) && atuin sync"
4550
```
4651

4752
1. Navigate to the chezmoi dir by executing `chezmoi cd`
@@ -71,7 +76,7 @@ In a terminal, get the Firefox Account Password by running:
7176
rbw get "Firefox Account" | pbcopy
7277
```
7378

74-
Open Firefox and open the top-right menu to enable sync.
79+
Open a **new** Firefox window and open the top-right menu to enable sync.
7580
You will be required to login, use your email and the password you just copied to your clipboard.
7681
After logging in, all the Add-ons will be synced to the machine.
7782

@@ -97,23 +102,23 @@ In the left sidebar, down left, login using your GitHub account. Everything shou
97102

98103
Open `Settings -> Online Accounts`. Click the Microsoft 365 account and add the following ID as tenant ID: `8ef61e06-9fd5-49af-9b63-6983aede4213`. [Source](https://gitlab.gnome.org/Infrastructure/Infrastructure/-/issues/1382). Note that this should no longer be needed once we run Gnome 47, which has this pre-configured.
99104

100-
NOTE: this does not work correctly with syncing back so we started using rclone. Document this before pushing this readme again. summary steps:
101-
102-
https://itsfoss.com/use-onedrive-linux-rclone/ Followed this guide.
105+
Configure `rclone` by creating a Onedrive. This must have `onedrive` as the name to automatically mount on startup!
103106

104107
## Speedrun record 🏃
105108

106109
I try and re-install my system about every month while measuring how long it takes to set back up again.
107110
Since this is on Ubuntu Asahi, I measure this from the point the OS is installed and a new user with my name has been set up.
108111

109-
Current record: **20:38:32** (- ~12min), set at 28-01-2024.
112+
Current record: **20:38:32** (- ~12 minutes), set at 28-01-2024.
113+
114+
See [RUN_RECORDS.md](./RUN_RECORDS.md) for historical runs and more.
110115

111116
## Tools Used 🧰
112117

113118
Everything is managed by [`chezmoi`](https://www.chezmoi.io/).
114119
The `run_once_` Bash scripts install all the tools we depend upon and actually manage the machine, namely:
115120

116-
- **Aqua**: [`aqua`](https://aquaproj.github.io/) is our entrypoint and actually installs Mise and a lot of other single-binary, zero dependency tools.
121+
- **Aqua**: [`aqua`](https://aquaproj.github.io/) is our entrypoint and actually installs a lot of single-binary, zero dependency tools.
117122
- **Mise**: [`mise`](https://mise.jdx.dev/) manages our more involved tools like Python, Node, Go, Rust, etc. See the [`config.toml`](chezmoi/dot_config/mise/config.toml) for all dependencies managed.
118123
- **Ansible**: [Ansible](https://www.ansible.com/) manages our installed Applications using Flatpak, APT and sometimes a plain `.deb` file. See the [Ansible Playbook](ansible/setup.yaml) for more detailed information.
119124

RUN_RECORDS.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Run Records
2+
3+
## Template
4+
5+
```plain
6+
## <DATE>
7+
8+
Completion time: `<mm:ss:ms>`
9+
10+
### Remarks
11+
12+
### Possible improvements
13+
14+
```
15+
16+
## 10-01-2025
17+
18+
Completion time: `27:05:25`
19+
20+
### Remarks
21+
22+
Actually went really smooth this time. Flatpaks and cargo installs take a really long time, but that was still 10 minutes or so. The reboot in the VM takes a really long time so certainly lost time there. Then there is the extension installation which just takes a bit of time and keeps shifting focus of the tab. Signing in to vscode opens LibreOffice Writer (WTF?!). Extension installation finally now is a good experience.
23+
24+
### Possible improvements
25+
26+
- ~~Open instructions in new window so it does not lose focus when settings up addons~~
27+
- ~~Shorten reboot time~~
28+
- ~~Preset `ANSIBLE_PASSWORD`~~
29+
- ~~See if `gext` has a way to disable confirmation~~: not possible, see [issue](https://github.com/essembeh/gnome-extensions-cli/issues/13#issuecomment-1529160849)
30+
- ~~Add instruction to explicitly sync Atuin~~
31+
- ~~Check logins of the sites and maybe have priorities?~~: cleaned up logins, can't have priorities.

chezmoi/.chezmoi.toml.tmpl

+4
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@ args = [
44
"-c",
55
"cp {{ "{{ .Target }}" }} {{ "{{ .Target }}" }}.base && code --new-window --wait --merge {{ "{{ .Destination }}" }} {{ "{{ .Target }}" }} {{ "{{ .Target }}" }}.base {{ "{{ .Source }}" }}",
66
]
7+
8+
# This need to detect if we are interactive or in a script.
9+
{{ if lookPath "diffnav" }}
710
[diff]
811
pager = "diffnav"
12+
{{ end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
echo ""
4+
echo "==============================================================="
5+
echo ""
6+
echo "Installing Mise"
7+
echo ""
8+
echo "==============================================================="
9+
echo ""
10+
11+
wget -qO- https://mise.run/ | sh
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
3+
echo ""
4+
echo "==============================================================="
5+
echo ""
6+
echo "Installing core dependencies with Ansible"
7+
echo ""
8+
echo "==============================================================="
9+
echo ""
10+
11+
# ansible/tasks/install_core_packages.yaml hash: {{ include "ansible/tasks/install_core_packages.yaml" | sha256sum }}
12+
13+
sudo apt-get update
14+
15+
echo "Installing dependencies for building Python..."
16+
sudo apt-get install -qq -y make build-essential libssl-dev zlib1g-dev \
17+
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
18+
libncurses-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
19+
20+
echo "Installing Git as Mise needs that as dependency"
21+
sudo apt install git -y
22+
23+
24+
mise install python
25+
mise install pipx
26+
mise install pipx:ansible[pipx_args="--include-deps"]
27+
28+
echo "Initializing mise..."
29+
eval "$(mise env -s bash)"
30+
31+
ansible-playbook -v {{ joinPath .chezmoi.sourceDir "ansible/setup.yaml" | quote }} --tags core-packages

chezmoi/.chezmoiscripts/run_once_after_30_install-tools-with-mise.sh

-11
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,4 @@ echo ""
88
echo "==============================================================="
99
echo ""
1010

11-
echo "Installing Git as Mise needs that as dependency"
12-
sudo apt install git -y
13-
14-
wget -qO- https://mise.run/ | sh
15-
16-
echo "Installing dependencies for building Python..."
17-
sudo apt-get update
18-
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev \
19-
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
20-
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
21-
2211
mise install --yes

chezmoi/.chezmoiscripts/run_once_after_40_install-ansible.sh.tmpl

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ echo ""
1414
echo "Initializing mise..."
1515
eval "$(mise env -s bash)"
1616

17-
# pipx does not automatically install the dependencies and therefore we cannot install it with mise.
18-
pipx install --include-deps ansible
19-
2017
if [[ -v ANSIBLE_PASSWORD ]]; then
2118
echo "ANSIBLE_PASSWORD set, becoming with value"
2219
echo "debug: $ANSIBLE_PASSWORD"

chezmoi/.chezmoiscripts/run_once_after_50_load-dconf-settings.sh.tmpl

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ echo ""
1111
echo "==============================================================="
1212
echo ""
1313

14-
cat {{ joinPath .chezmoi.sourceDir "installed-extensions.txt" | quote }} | xargs -I {} gext install {}
14+
echo "Initializing mise..."
15+
eval "$(mise env -s bash)"
16+
17+
gext -D install $(cat {{ joinPath .chezmoi.sourceDir "installed-extensions.txt" | quote }} | tr '\n' ' ')
1518

1619
dconf load / < {{ joinPath .chezmoi.sourceDir "dconf.ini" | quote }}

chezmoi/.chezmoiscripts/run_once_after_99_reboot.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ perform_reboot() {
2020
reboot
2121
}
2222

23-
echo "Rebooting in 30 seconds. Type 'x' and press Enter to cancel the reboot."
23+
echo "Rebooting in 10 seconds. Type 'x' and press Enter to cancel the reboot."
2424

25-
for i in {30..1}; do
25+
for i in {10..1}; do
2626
echo -ne "\rRebooting in $i seconds... "
2727

2828
# Check for user input in the background

chezmoi/.chezmoiscripts/run_onchange_10_run_ansible.sh.tmpl

-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ if command -v ansible-playbook &> /dev/null; then
1111
ansible-playbook -v {{ joinPath .chezmoi.sourceDir "ansible/setup.yaml" | quote }} --ask-become-pass
1212
fi
1313
fi
14-

chezmoi/.chezmoiscripts/run_onchange_30_install_extensions_list.sh.tmpl

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@ echo ""
1111
# dconf.ini hash: {{ include "installed-extensions.txt" | sha256sum }}
1212

1313
if command -v gext &> /dev/null; then
14-
cat {{ joinPath .chezmoi.sourceDir "installed-extensions.txt" | quote }} | xargs -I {} gext install {}
14+
gext -D install $(cat {{ joinPath .chezmoi.sourceDir "installed-extensions.txt" | quote }} | tr '\n' ' ')
1515
fi
16-

chezmoi/ansible/setup.yaml

+16-57
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
vscode_deb_url: https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-arm64
2929
when: ansible_architecture == 'aarch64'
3030

31+
- name: Install core packages
32+
include_tasks:
33+
file: tasks/install_core_packages.yaml
34+
apply:
35+
tags: [core-packages]
36+
tags: [core-packages]
37+
3138
- name: Install packages
3239
ansible.builtin.apt:
3340
pkg:
@@ -42,6 +49,7 @@
4249
- gtk2-engines-murrine
4350
- jc
4451
- kitty # Our terminal!
52+
- lshw
4553
- nala
4654
- network-manager-l2tp
4755
- network-manager-l2tp-gnome
@@ -83,14 +91,10 @@
8391
community.general.flatpak:
8492
name:
8593
- org.videolan.VLC
86-
- org.gnome.meld
8794
- io.podman_desktop.PodmanDesktop
88-
- org.flameshot.Flameshot
8995
- io.dbeaver.DBeaverCommunity
9096
- io.github.seadve.Kooha
91-
- com.axosoft.GitKraken
9297
- md.obsidian.Obsidian
93-
- app.getclipboard.Clipboard
9498
- dev.vencord.Vesktop
9599
- com.moonlight_stream.Moonlight
96100
state: present
@@ -175,22 +179,21 @@
175179
- name: "[BLOCK] Add repo, install and configure Incus"
176180
block:
177181
- name: Add Incus's official GPG key
178-
ansible.builtin.apt_key:
182+
ansible.builtin.get_url:
179183
url: https://pkgs.zabbly.com/key.asc
180-
keyring: /etc/apt/keyrings/zabbly.asc
181-
state: present
182-
- name: Add Incus repository
183-
ansible.builtin.apt_repository:
184-
repo: >-
185-
Enabled: yes
184+
dest: /etc/apt/keyrings/zabbly.asc
185+
# NOTE: hardcoded to noble as Incus does not do non-LTS releases
186+
- name: Add Incus repository file
187+
ansible.builtin.copy:
188+
dest: "/etc/apt/sources.list.d/incus.sources"
189+
content: |
186190
Types: deb
187191
URIs: https://pkgs.zabbly.com/incus/stable
188192
Suites: noble
189193
Components: main
190194
Architectures: {{ arch_mapping[ansible_architecture] | default(ansible_architecture) }}
191195
Signed-By: /etc/apt/keyrings/zabbly.asc
192-
filename: incus
193-
state: present
196+
mode: '0644'
194197
- name: Install Incus and related packages
195198
ansible.builtin.apt:
196199
pkg:
@@ -207,50 +210,6 @@
207210
groups: incus-admin
208211
append: true
209212

210-
# === NOTE: This is currently not working on Ubuntu Asahi
211-
# - name: "[BLOCK] Add repo, install and configure Firefox"
212-
# block:
213-
# - name: Add Firefox's official GPG key
214-
# ansible.builtin.apt_key:
215-
# url: https://packages.mozilla.org/apt/repo-signing-key.gpg
216-
# keyring: /etc/apt/keyrings/packages.mozilla.org.gpg
217-
# state: absent
218-
# - name: Add Firefox repository
219-
# ansible.builtin.apt_repository:
220-
# repo: >-
221-
# deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.gpg]
222-
# https://packages.mozilla.org/apt mozilla main
223-
# filename: mozilla
224-
# state: absent
225-
# - name: Install Firefox
226-
# ansible.builtin.apt:
227-
# pkg:
228-
# - firefox
229-
# state: absent
230-
# update_cache: true
231-
232-
# === NOTE: This is currently not working on Ubuntu Asahi
233-
# - name: "[BLOCK] Add repo, install and configure Progressive Web Apps for Firefox"
234-
# block:
235-
# - name: ==== Add firefoxpwa's official GPG key
236-
# ansible.builtin.apt_key:
237-
# url: https://packagecloud.io/filips/FirefoxPWA/gpgkey
238-
# keyring: /usr/share/keyrings/firefoxpwa-keyring.gpg
239-
# state: absent
240-
# - name: Add firefoxpwa repository
241-
# ansible.builtin.apt_repository:
242-
# repo: >-
243-
# deb [signed-by=/usr/share/keyrings/firefoxpwa-keyring.gpg]
244-
# https://packagecloud.io/filips/FirefoxPWA/any any main
245-
# filename: firefoxpwa
246-
# state: absent
247-
# - name: Install Progressive Web Apps for Firefox
248-
# ansible.builtin.apt:
249-
# pkg:
250-
# - firefoxpwa
251-
# state: absent
252-
# update_cache: true
253-
254213
# NOTE: this should be absolutely last as afterwards restart is needed.
255214
- name: Install Pop Shell if not present
256215
become: false

0 commit comments

Comments
 (0)