23
roles/dotfiles/tasks/main.yml
Normal file
23
roles/dotfiles/tasks/main.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
# tasks file for dotfiles
|
||||
- name: Ensure stow is installed
|
||||
become: true
|
||||
pacman:
|
||||
name:
|
||||
- stow
|
||||
state: present
|
||||
|
||||
- name: Remove existing config files before stowing
|
||||
shell: |
|
||||
[ -L ~/.config/hypr/hyprland.conf ] || rm -f ~/.config/hypr/hyprland.conf
|
||||
[ -L ~/.config/starship ] || rm -rf ~/.config/starship
|
||||
[ -L ~/.config/zellij ] || rm -rf ~/.config/zellij
|
||||
changed_when: false
|
||||
|
||||
- name: Create symlinks with stow
|
||||
shell: |
|
||||
cd {{ lookup('env', 'HOME') }}/archsetup/dotfiles
|
||||
stow -t ~ hypr starship zellij
|
||||
args:
|
||||
executable: /bin/bash
|
||||
creates: "{{ lookup('env', 'HOME') }}/.config/starship"
|
||||
chdir: "{{ lookup('env', 'HOME') }}/archsetup/dotfiles"
|
||||
Reference in New Issue
Block a user