install and configure zsh

This commit is contained in:
2025-02-03 22:14:05 +01:00
parent 77fbef0447
commit 473f8e2d39
6 changed files with 63 additions and 1 deletions
+3
View File
@@ -9,4 +9,7 @@ common_packages:
- sudo
- btop
- kitty-terminfo
- zsh
- zsh-syntax-highlighting
- fzf
host_packages:
+4 -1
View File
@@ -55,6 +55,8 @@
include_tasks: tasks/install_docker_debian.yml
- name: Add utility scripts
hosts: all
- name: Setup zsh
hosts: debian
become: true
remote_user: nerevar
tasks:
@@ -64,8 +66,9 @@
vars_files:
- vault/nocturnal.yml
become: true
remote_user: nerevar
tasks:
- import_tasks: tasks/nocturnal_smb.yml
- import_tasks: tasks/zsh.yml
- name: Install tmux
hosts: all
become: true
+41
View File
@@ -0,0 +1,41 @@
- name: Install zsh
apt:
name:
- zsh
- zsh-syntax-highlighting
- fzf
state: present
- name: Create .config/zsh directory
file:
path: "/home/{{ item }}/.config/zsh"
state: directory
mode: "0755"
loop: "{{ users }}"
when: users is defined
- name: Copy .zshenv
copy:
src: zsh/.zshenv
dest: "/home/{{ item }}/.zshenv"
mode: "0644"
loop: "{{ users }}"
when: users is defined
- name: Copy .zshrc
copy:
src: zsh/.zshrc
dest: "/home/{{ item }}/.config/zsh/.zshrc"
mode: "0644"
loop: "{{ users }}"
when: users is defined
- name: Copy .aliasrc
copy:
src: zsh/.aliasrc
dest: "/home/{{ item }}/.config/zsh/.aliasrc"
mode: "0644"
loop: "{{ users }}"
when: users is defined
- name: Set zsh as default shell
user:
name: "{{ item }}"
shell: /bin/zsh
loop: "{{ users }}"
when: users is defined
+3
View File
@@ -0,0 +1,3 @@
alias s="sudo systemctl" \
ss="sudo systemctl start" \
pls="sudo"
+2
View File
@@ -0,0 +1,2 @@
ZDOTDIR=$HOME/.config/zsh
ZSH_CUSTOM=$HOME/.config/zsh/custom
+10
View File
@@ -0,0 +1,10 @@
autoload -Uz compinit promptinit
zstyle ':completion::complete:*' gain-privileges 1
autoload -U colors && colors
compinit
promptinit
source ~/.config/zsh/.aliasrc
# This will set the default prompt to the walters theme
prompt walters