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

Lines changed: 0 additions & 35 deletions
This file was deleted.

README.md

Lines changed: 16 additions & 11 deletions
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

Lines changed: 31 additions & 0 deletions
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

Lines changed: 4 additions & 0 deletions
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 }}
Lines changed: 11 additions & 0 deletions
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
Lines changed: 31 additions & 0 deletions
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

Lines changed: 0 additions & 11 deletions
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

Lines changed: 0 additions & 3 deletions
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

Lines changed: 4 additions & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

0 commit comments

Comments
 (0)