use same shell setup as in nix home manager

This commit is contained in:
2026-09-09 08:17:48 +02:00
parent 3d1675528b
commit dae2470e67
9 changed files with 207 additions and 18 deletions

View File

@@ -17,21 +17,35 @@
dest: /usr/local/bin/bat
state: link
- name: Download starship install script
- name: Download oh-my-posh install script
ansible.builtin.get_url:
url: "{{ pi_modern_shell_env_starship_install_url }}"
dest: /tmp/starship-install.sh
url: "{{ pi_modern_shell_env_ohmyposh_install_url }}"
dest: /tmp/ohmyposh-install.sh
mode: "0755"
- name: Run starship install script
- name: Run oh-my-posh install script
ansible.builtin.command:
cmd: /tmp/starship-install.sh --yes
creates: /usr/local/bin/starship
cmd: /tmp/ohmyposh-install.sh -d /usr/local/bin
creates: /usr/local/bin/oh-my-posh
- name: Determine target user's home directory
ansible.builtin.set_fact:
pi_modern_shell_env_target_home: "{{ '/root' if pi_modern_shell_env_target_user == 'root' else '/home/' + pi_modern_shell_env_target_user }}"
- name: Ensure config directory exists
ansible.builtin.file:
path: "{{ pi_modern_shell_env_target_home }}/.config"
state: directory
owner: "{{ pi_modern_shell_env_target_user }}"
mode: "0700"
- name: Deploy oh-my-posh theme
ansible.builtin.copy:
src: ohmyposh.json
dest: "{{ pi_modern_shell_env_target_home }}/.config/ohmyposh.json"
owner: "{{ pi_modern_shell_env_target_user }}"
mode: "0644"
- name: Ensure fish config directory exists
ansible.builtin.file:
path: "{{ pi_modern_shell_env_target_home }}/.config/fish"