Skip to content

Commit 46c5991

Browse files
committed
feat: ensure pre-commit is installed and usable
1 parent d348e13 commit 46c5991

4 files changed

Lines changed: 44 additions & 2 deletions

File tree

dot_config/oh-my-posh/cloud-native-tokyo-night.omp.json

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
"type": "status",
117117
"style": "diamond",
118118
"foreground_templates": [
119-
"{{ if gt .Code 0 }}p:white{{ end }}"
119+
"{{ if gt .Code 0 }}p:black{{ end }}"
120120
],
121121
"background_templates": [
122122
"{{ if gt .Code 0 }}p:red{{ end }}"
@@ -154,6 +154,30 @@
154154
"style": "diamond",
155155
"min_width": 120
156156
},
157+
{
158+
"type": "rust",
159+
"style": "diamond",
160+
"foreground": "p:black",
161+
"background": "p:orange",
162+
"leading_diamond": "\ue0b2",
163+
"template": "  {{ .Full }} "
164+
},
165+
{
166+
"type": "node",
167+
"style": "diamond",
168+
"foreground": "p:black",
169+
"background": "p:green",
170+
"leading_diamond": "\ue0b2",
171+
"template": "  {{ .Full }} "
172+
},
173+
{
174+
"type": "dotnet",
175+
"style": "diamond",
176+
"leading_diamond": "\ue0b2",
177+
"foreground": "p:black",
178+
"background": "p:blue",
179+
"template": "  {{ .Full }} "
180+
},
157181
{
158182
"options": {
159183
"always_enabled": true,

dot_config/zsh_aliases

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ alias g="git"
1717
alias gp="git pull"
1818
alias gpu="git push origin HEAD"
1919
alias gca="git add . && git commit && git push origin HEAD"
20+
alias dup="docker compose up -d"
21+
alias dlogs="docker compose logs -f"
22+
alias ddown="docker compose down"
23+
alias upd="chezmoi update && chezmoi apply && ~/scripts/ansible/exec.sh"
2024

2125
if command -v batcat &> /dev/null; then
2226
alias cat="batcat --paging=never"

scripts/ansible/playbook.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
- jq
7676
- yq
7777
- shellcheck
78-
- pre-commit
7978
- libclang-dev
8079
unlisted_packages:
8180
- name: Dive
@@ -102,6 +101,8 @@
102101
hosts: localhost
103102
vars:
104103
rustup_user: "{{ ansible_facts['user_id'] }}"
104+
uv_tools:
105+
- pre-commit
105106
roles:
106107
- rootless-networking
107108
- nvm

scripts/ansible/roles/uv/tasks/main.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,16 @@
5555
- name: Show uv version
5656
debug:
5757
msg: "uv installed: {{ uv_verify.stdout }}"
58+
59+
- name: Get installed uv tools
60+
command: "{{ uv_install_dir }}/uv tool list"
61+
register: installed_uv_tools
62+
changed_when: false
63+
failed_when: false
64+
65+
- name: Install uv tools
66+
command: "{{ uv_install_dir }}/uv tool install {{ item }} --force"
67+
loop: "{{ uv_tools | default([]) }}"
68+
when:
69+
- uv_tools is defined
70+
- item not in installed_uv_tools.stdout

0 commit comments

Comments
 (0)