chore: first commit

This commit is contained in:
Clément Désiles
2025-07-25 20:23:54 +02:00
parent 5c4016357f
commit c612cc7839
88 changed files with 3255 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
---
- name: install zsh
package:
name: zsh
state: present
- name: install zsh plugins
include_tasks: plugins.yml
- name: setup zsh for the user(s)
include_tasks: user-setup.yml
vars:
zsh_user: "{{ item }}"
loop: "{{ zsh_users | default([]) }}"
+50
View File
@@ -0,0 +1,50 @@
---
- name: ensure plugins directory exists
ansible.builtin.file:
path: "{{ zsh_plugins_path }}"
state: directory
owner: root
group: users
mode: "0755"
- name: add a readme file to advice from where this comes
ansible.builtin.copy:
dest: "{{ zsh_plugins_path }}/README.md"
content: |
# zsh plugins
Managed by Ansible
mode: "0644"
group: users
owner: root
- name: "git clone plugins"
git:
repo: "{{ item.repo }}"
dest: "{{ item.dest }}"
update: yes
version: master
loop:
- {
repo: https://github.com/zsh-users/zsh-syntax-highlighting.git,
dest: "{{ zsh_plugins_path }}/zsh-syntax-highlighting",
}
- {
repo: https://github.com/zsh-users/zsh-autosuggestions.git,
dest: "{{ zsh_plugins_path }}/zsh-autosuggestions",
}
- {
repo: https://github.com/romkatv/powerlevel10k.git,
dest: "{{ zsh_plugins_path }}/powerlevel10k",
}
- name: assert plugins are available for any user
ansible.builtin.file:
path: "{{ item }}"
owner: root
group: users
mode: "0755"
state: directory
loop:
- "{{ zsh_plugins_path }}/zsh-syntax-highlighting"
- "{{ zsh_plugins_path }}/zsh-autosuggestions"
- "{{ zsh_plugins_path }}/powerlevel10k"
+44
View File
@@ -0,0 +1,44 @@
- name: setup zsh base config
ansible.builtin.template:
src: main.zshrc.j2
dest: "{{ zsh_base_config }}"
owner: "{{ zsh_user }}"
group: "{{ zsh_user }}"
mode: "0600"
- name: setup .config/zsh directory
ansible.builtin.file:
path: "{{ zsh_config_path }}"
state: directory
owner: "{{ zsh_user }}"
group: "{{ zsh_user }}"
mode: "0700"
- name: configure zsh config
ansible.builtin.template:
src: zshrc.j2
dest: "{{ zsh_config_file }}"
owner: "{{ zsh_user }}"
group: "{{ zsh_user }}"
mode: "0600"
- name: copy aliases
ansible.builtin.copy:
src: ./templates/aliases
dest: "{{ zsh_config_path }}/aliases"
owner: "{{ zsh_user }}"
group: "{{ zsh_user }}"
mode: "0600"
- name: change default shell to zsh
user:
name: "{{ zsh_user }}"
shell: /bin/zsh
- name: configure powerlevel10k theme
ansible.builtin.copy:
src: "./templates/{{ 'root.p10k.zsh' if zsh_user == 'root' else 'user.p10k.zsh' }}"
dest: "{{ zsh_p10k_theme_config }}"
owner: "{{ zsh_user }}"
group: "{{ zsh_user }}"
mode: "0600"