Skip to content

Commit 8c2a99b

Browse files
committed
fix: no nested chezmoi data, install rbw to auto-fetch password, install rbw with github
1 parent 4ab0377 commit 8c2a99b

9 files changed

Lines changed: 48 additions & 34 deletions

chezmoi/.chezmoi.toml.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ args = [
1111
pager = "diffnav"
1212
{{ end }}
1313

14-
{{- $full_name := promptStringOnce .git "name" "Full Name" -}}
15-
{{- $email := promptStringOnce .git "email" "email" -}}
16-
{{- $email_work := promptStringOnce .git "email_work" "Work Email" -}}
14+
{{- $full_name := promptString "name" "Full Name" -}}
15+
{{- $email := promptString "email" "email" -}}
16+
{{- $email_work := promptString "email_work" "Work Email" -}}
1717

1818

19-
[data.git]
19+
[data]
2020
email = {{ $email | quote }}
2121
name = {{ $full_name | quote }}
2222
email_work = {{ $email_work | quote }}

chezmoi/.chezmoiscripts/run_once_after_20_install-aqua-and-tools.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,3 @@ export AQUA_ROOT_DIR="${XDG_DATA_HOME:-$HOME/.local/share/aquaproj-aqua}"
1515
export PATH="${AQUA_ROOT_DIR}/bin:$PATH"
1616
export AQUA_GLOBAL_CONFIG=${AQUA_GLOBAL_CONFIG:-${XDG_CONFIG_HOME:-$HOME/.config}/aquaproj-aqua/aqua.yaml}
1717
export AQUA_GENERATE_WITH_DETAIL=true
18-
19-
echo "Installing global tools with Aqua..."
20-
aqua install --all

chezmoi/.chezmoiscripts/run_once_after_22_install-core-dependencies.sh.tmpl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,16 @@ sudo apt-get install -qq -y make build-essential libssl-dev zlib1g-dev \
1717
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
1818
libncurses-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
1919

20-
echo "Installing Git as Mise needs that as dependency"
20+
echo "Installing Git as Mise needs that as dependency..."
2121
sudo apt install git -y
2222

23-
23+
echo "Installing Python with Mise to enable Ansible Run..."
2424
mise install python
25-
mise install pipx
26-
mise install pipx:ansible[pipx_args="--include-deps"]
25+
mise install uv
26+
mise install pipx:ansible[uvx_args="--with-executables-from ansible-core,ansible-lint"]
2727

2828
echo "Initializing mise..."
2929
eval "$(mise env -s bash)"
3030

31+
echo "Running Ansible Playbook for core packages..."
3132
ansible-playbook -v {{ joinPath .chezmoi.sourceDir "ansible/setup.yaml" | quote }} --tags core-packages
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env -S bash
2+
3+
echo ""
4+
echo "==============================================================="
5+
echo ""
6+
echo "Installing tools managed by Mise & Aqua"
7+
echo ""
8+
echo "==============================================================="
9+
echo ""
10+
11+
echo "Installing rbw..."
12+
mise use aqua:doy/rbw
13+
14+
echo "Logging into Bitwarden..."
15+
rbw login
16+
17+
echo "Setting GitHub token fetched from Bitwarden..."
18+
GITHUB_TOKEN="$(rbw get GITHUB_TOKEN)"
19+
export GITHUB_TOKEN
20+
21+
echo "Installing global tools with Aqua..."
22+
aqua install --all
23+
24+
echo "Installing global tools managed with Mise..."
25+
mise install --yes

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

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

chezmoi/ansible/setup.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
when: ansible_architecture == 'aarch64'
3636

3737
- name: Install core packages
38-
include_tasks:
38+
ansible.builtin.include_tasks:
3939
file: tasks/install_core_packages.yaml
4040
apply:
4141
tags: [core-packages]
@@ -84,20 +84,21 @@
8484
- gstreamer1.0-icamera
8585
update_cache: true
8686

87-
88-
8987
- name: "[BLOCK] Setting up DisplayLink drivers"
9088
block:
9189
- name: Download Synaptics repository keyring package
92-
get_url:
90+
ansible.builtin.get_url:
9391
url: "{{ synaptics_package_url }}"
9492
dest: "{{ synaptics_package_path }}"
9593
mode: '0644'
94+
# Remove the standalone DisplayLink driver if it was previously installed on the system.
95+
# This task ensures a clean state before installing a newer version or alternative display driver,
96+
# preventing conflicts between multiple DisplayLink installations.
9697
- name: Remove standalone DisplayLink driver (if present)
9798
ansible.builtin.apt:
9899
name: displaylink
99100
state: absent
100-
ignore_errors: true
101+
failed_when: false
101102

102103
- name: Install Synaptics APT Repository keyring
103104
ansible.builtin.apt:
@@ -233,12 +234,12 @@
233234
groups: docker
234235
append: true
235236
- name: Ensure /etc/docker directory exists
236-
file:
237+
ansible.builtin.file:
237238
path: /etc/docker
238239
state: directory
239240
mode: '0755'
240241
- name: Copy Docker daemon configuration
241-
copy:
242+
ansible.builtin.copy:
242243
content: "{{ docker_config | to_nice_json }}"
243244
dest: /etc/docker/daemon.json
244245
mode: '0644'
@@ -257,6 +258,7 @@
257258
ansible.builtin.get_url:
258259
url: https://pkgs.zabbly.com/key.asc
259260
dest: /etc/apt/keyrings/zabbly.asc
261+
mode: '0644'
260262
# NOTE: hardcoded to noble as Incus does not do non-LTS releases
261263
- name: Add Incus repository file
262264
ansible.builtin.copy:
@@ -317,7 +319,7 @@
317319
nerd_fonts_base_url: "https://github.com/ryanoasis/nerd-fonts/releases/latest/download"
318320
block:
319321
- name: Ensure fonts directory exists
320-
file:
322+
ansible.builtin.file:
321323
path: "{{ nerd_fonts_dir }}"
322324
state: directory
323325
mode: '0755'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[user]
2-
email = {{ .git.email_work | quote }}
2+
email = {{ .email_work | quote }}

chezmoi/dot_config/git/config.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
credentialsInUrl = "warn"
5050

5151
[user]
52-
email = "{{ .git.email }}"
53-
name = "{{ .git.name }}"
52+
email = "{{ .email }}"
53+
name = "{{ .name }}"
5454
signingkey = "~/.ssh/id_ed25519"
5555

5656
[git-town]

chezmoi/dot_config/mise/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ pipx = "latest"
4242
"cargo:lstr" = "0.2.1"
4343
"cargo:mergiraf" = "0.16.3"
4444
"cargo:onefetch" = "2.26.1"
45-
"cargo:rbw" = "1.15.0"
4645
"cargo:so" = "0.4.10"
4746
"cargo:soptikha2/desed" = "tag:v1.2.2"
4847
"cargo:zeitfetch" = "0.1.16"
@@ -64,6 +63,7 @@ pipx = "latest"
6463
"github:aws-cloudformation/rain" = "1.24.2"
6564
"github:blacknon/hwatch" = "0.3.19"
6665
"github:bluetuith-org/bluetuith" = "0.2.6"
66+
"github:doy/rbw" = "1.15.0"
6767
"github:ekzhang/bore" = "0.6.0"
6868
"github:eugene-babichenko/fixit" = "0.11.0"
6969
"github:fioncat/otree" = "0.6.4"

0 commit comments

Comments
 (0)