diff --git a/files/dotfiles/zshrc b/files/dotfiles/zshrc index 899b508..97d46c8 100644 --- a/files/dotfiles/zshrc +++ b/files/dotfiles/zshrc @@ -1,7 +1,7 @@ # If you come from bash you might have to change your $PATH. # Path to your oh-my-zsh installation. -export ZSH="/home/sdayan/.oh-my-zsh" +export ZSH="${HOME}/.oh-my-zsh" # Set name of the theme to load --- if set to "random", it will # load a random theme each time oh-my-zsh is loaded, in which case, diff --git a/playbooks/workstation.yml b/playbooks/workstation.yml index 0e96e0b..6c611d0 100644 --- a/playbooks/workstation.yml +++ b/playbooks/workstation.yml @@ -10,4 +10,5 @@ - tmux_user - vim_user - alacritty_user + - ncspot_user - flatpaks diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml index cf1756e..ae78a48 100644 --- a/roles/base/tasks/main.yml +++ b/roles/base/tasks/main.yml @@ -41,12 +41,6 @@ dest: ~/.zshrc force: yes -- name: Fix oh-my-zsh sourcing - ansible.builtin.lineinfile: - path: "~/.zshrc" - regexp: "^export ZSH=" - line: 'export ZSH="/home/{{running_user}}/.oh-my-zsh"' - - name: Add ranger devicons plugin repo git: repo: https://github.com/alexanderjeurissen/ranger_devicons.git @@ -121,7 +115,10 @@ - name: Install rust and common tooling vars: rustup_user: "{{ running_user }}" - rustup_cargo_crates: [bat,lsd,bottom,gitui] + rustup_cargo_crates: [bat,lsd,bottom] ansible.builtin.include_role: name: hurricanehrndz.rustup - + +- name: Gitui user + include_role: + name: gitui_user diff --git a/roles/gitui_user/tasks/main.yml b/roles/gitui_user/tasks/main.yml new file mode 100644 index 0000000..8b516b2 --- /dev/null +++ b/roles/gitui_user/tasks/main.yml @@ -0,0 +1,28 @@ +- name: Install gitui dependencies (RHEL) + become: true + package: + name: &gitui_deps_rhel + - perl + state: present + when: ansible_facts['os_family'] == "RedHat" + +- name: Installing gitui + vars: + rustup_user: "{{ running_user }}" + rustup_cargo_crates: [gitui] + ansible.builtin.include_role: + name: hurricanehrndz.rustup + +- name: Setting up ncspot alias (spot) + ansible.builtin.lineinfile: + line: alias spot=ncspot + state: present + path: ~/.shellconfig/aliases.sh + insertafter: EOF + +- name: Remove gitui dependencies (RHEL) + become: true + package: + name: *gitui_deps_rhel + state: absent + when: ansible_facts['os_family'] == "RedHat" diff --git a/roles/ncspot_user/tasks/main.yml b/roles/ncspot_user/tasks/main.yml new file mode 100644 index 0000000..33dddf2 --- /dev/null +++ b/roles/ncspot_user/tasks/main.yml @@ -0,0 +1,54 @@ +- name: Install ncspot dependencies (RHEL) + become: true + package: + name: &ncspot_deps_rhel + - pulseaudio-libs-devel + - libxcb-devel + - openssl-devel + - ncurses-devel + - dbus-devel + state: present + when: ansible_facts['os_family'] == "RedHat" + +- name: Install ncspot dependencies (Debian) + become: true + package: + name: &ncspot_deps_debian + - libncursesw5-dev + - libdbus-1-dev + - libpulse-dev + - libssl-dev + - libxcb1-dev + - libxcb-render0-dev + - libxcb-shape0-dev + - libxcb-xfixes0-dev + state: present + when: ansible_facts['os_family'] == "Debian" + +- name: Installing nscpot + vars: + rustup_user: "{{ running_user }}" + rustup_cargo_crates: [ncspot] + ansible.builtin.include_role: + name: hurricanehrndz.rustup + +- name: Setting up ncspot alias (spot) + ansible.builtin.lineinfile: + line: alias spot=ncspot + state: present + path: ~/.shellconfig/aliases.sh + insertafter: EOF + +- name: Remove ncspot dependencies (RHEL) + become: true + package: + name: *ncspot_deps_rhel + state: absent + when: ansible_facts['os_family'] == "RedHat" + +- name: Remove ncspot dependencies (Debian) + become: true + package: + name: *ncspot_deps_debian + state: absent + when: ansible_facts['os_family'] == "Debian"