chore: rework directory structure

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2023-08-27 11:43:02 +02:00
parent 1fbdeb0d21
commit 01225fd44d
Signed by: mfocko
GPG key ID: 7C47D46246790496
169 changed files with 1410 additions and 1690 deletions

View file

@ -0,0 +1,23 @@
---
- name: Install zsh
ansible.builtin.package:
name:
- zsh
- autojump
state: present
become: true
- name: Install fzf for fuzzy finding
ansible.builtin.package:
name: fzf
state: present
become: true
when: ansible_distribution not in [ "AlmaLinux" ]
# “yet another dialog” for the functions in zshrc
- name: Install yad for prompts from shell
ansible.builtin.package:
name: yad
state: present
become: true
when: ansible_distribution not in [ "AlmaLinux" ]

View file

@ -0,0 +1,18 @@
---
- name: Packages
ansible.builtin.include_tasks: install.yml
tags: install
- name: Plugin oh-my-zsh
ansible.builtin.include_tasks: oh-my-zsh.yml
tags: zsh-oh-my-zsh
- name: Plugin starship
ansible.builtin.include_tasks: starship.yml
- name: Set default shell
become: true
ansible.builtin.user:
name: "{{ target_user }}"
shell: /bin/zsh
tags: zsh/set-default-shell

View file

@ -0,0 +1,35 @@
---
- name: Fetch the oh-my-zsh installer
ansible.builtin.get_url:
url: https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
dest: /tmp/oh-my-zsh.sh
mode: 0700
- name: Install oh-my-zsh
ansible.builtin.command:
cmd: sh /tmp/oh-my-zsh.sh --unattended
creates: ~/.oh-my-zsh
- name: Clone zsh-autosuggestions
ansible.builtin.git:
repo: https://github.com/zsh-users/zsh-autosuggestions
dest: ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
update: no
- name: Clone zsh-syntax-highlighting
ansible.builtin.git:
repo: https://github.com/zsh-users/zsh-syntax-highlighting.git
dest: ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
update: no
- name: Clone zsh-aliases-exa
ansible.builtin.git:
repo: https://github.com/DarrinTisdale/zsh-aliases-exa.git
dest: ~/.oh-my-zsh/custom/plugins/zsh-aliases-exa
update: no
- name: Install the config
ansible.builtin.copy:
src: files/zshrc
dest: ~/.zshrc
mode: 0600

View file

@ -0,0 +1,17 @@
---
- name: Fetch the starship installer
ansible.builtin.get_url:
url: https://starship.rs/install.sh
dest: /tmp/starship.sh
mode: 0700
- name: Install starship
ansible.builtin.command:
cmd: sh /tmp/starship.sh -f -b $HOME/.local/bin
creates: ~/.local/bin/starship
- name: Install starship configuration
ansible.builtin.copy:
src: files/starship.toml
dest: ~/.config/starship.toml
mode: 0600