diff --git a/roles/dotfiles/tasks/main.yml b/roles/dotfiles/tasks/main.yml index 5f3e6ad..b6f0b99 100644 --- a/roles/dotfiles/tasks/main.yml +++ b/roles/dotfiles/tasks/main.yml @@ -2,27 +2,27 @@ - name: Clone dot files repo ansible.builtin.git: repo: https://gitea.learningunix.net/cjr/dotfiles.git - dest: "{{ ansible_user_home }}/dotfiles" + dest: "{{ ansible_user_dir }}/dotfiles" update: true version: main - name: Clone the nvim repo ansible.builtin.git: repo: https://gitea.learningunix.net/cjr/vim.git - dest: "{{ ansible_user_home }}/nvim" + dest: "{{ ansible_user_dir }}/nvim" update: true version: main - name: Symlink .zshrc ansible.builtin.file: - src: "{{ ansible_user_home }}/dotfiles/zsh/.zshrc" - dest: "{{ ansible_user_home }}/.zshrc" + src: "{{ ansible_user_dir }}/dotfiles/zsh/.zshrc" + dest: "{{ ansible_user_dir }}/.zshrc" state: link force: true - name: Symlink nvim config ansible.builtin.file: - src: "{{ ansible_user_home }}/nvim" - dest: "{{ ansible_user_home }}/.config/nvim" + src: "{{ ansible_user_dir }}/nvim" + dest: "{{ ansible_user_dir }}/.config/nvim" state: link force: true diff --git a/roles/hotkeys/tasks/main.yml b/roles/hotkeys/tasks/main.yml index e43adea..2faa2e9 100644 --- a/roles/hotkeys/tasks/main.yml +++ b/roles/hotkeys/tasks/main.yml @@ -2,18 +2,18 @@ - name: Copy cheat sheet desktop file ansible.builtin.template: src: cheat-sheet.desktop.j2 - dest: "{{ ansible_user_home }}/.local/share/applications/net.local.cheat-sheet.sh.desktop" + dest: "{{ ansible_user_dir }}/.local/share/applications/net.local.cheat-sheet.sh.desktop" mode: "0644" - name: Copy password script ansible.builtin.template: src: pass-menu.desktop.j2 - dest: "{{ ansible_user_home }}/.local/share/applications/net.local.pass-menu.sh.desktop" + dest: "{{ ansible_user_dir }}/.local/share/applications/net.local.pass-menu.sh.desktop" mode: "0644" - name: Set cheat-sheet hotkey community.general.ini_file: - path: "{{ ansible_user_home }}/.config/kglobalshortcutsrc" + path: "{{ ansible_user_dir }}/.config/kglobalshortcutsrc" section: "services][net.local.cheat-sheet.sh.desktop" option: _launch value: Alt+C @@ -21,7 +21,7 @@ - name: Set pass-menu hotkey community.general.ini_file: - path: "{{ ansible_user_home }}/.config/kglobalshortcutsrc" + path: "{{ ansible_user_dir }}/.config/kglobalshortcutsrc" section: "services][net.local.pass-menu.sh.desktop" option: _launch value: Alt+P diff --git a/roles/hotkeys/templates/cheat-sheet.desktop.j2 b/roles/hotkeys/templates/cheat-sheet.desktop.j2 index b231597..7e8d449 100644 --- a/roles/hotkeys/templates/cheat-sheet.desktop.j2 +++ b/roles/hotkeys/templates/cheat-sheet.desktop.j2 @@ -1,5 +1,5 @@ [Desktop Entry] -Exec={{ ansible_user_home }}/scripts/cheat-sheet.sh +Exec={{ ansible_user_dir }}/scripts/cheat-sheet.sh Name=cheat-sheet NoDisplay=true StartupNotify=false diff --git a/roles/hotkeys/templates/pass-menu.desktop.j2 b/roles/hotkeys/templates/pass-menu.desktop.j2 index a50d102..9851870 100644 --- a/roles/hotkeys/templates/pass-menu.desktop.j2 +++ b/roles/hotkeys/templates/pass-menu.desktop.j2 @@ -1,5 +1,5 @@ [Desktop Entry] -Exec={{ ansible_user_home }}/scripts/pass-menu.sh +Exec={{ ansible_user_dir }}/scripts/pass-menu.sh Name=pass-menu NoDisplay=true StartupNotify=false diff --git a/roles/scripts/tasks/main.yml b/roles/scripts/tasks/main.yml index a6e7f96..eb2ecca 100644 --- a/roles/scripts/tasks/main.yml +++ b/roles/scripts/tasks/main.yml @@ -2,12 +2,12 @@ - name: Clone the scripts repo ansible.builtin.git: repo: https://gitea.learningunix.net/cjr/scripts - dest: "{{ ansible_user_home }}/scripts" + dest: "{{ ansible_user_dir }}/scripts" update: true version: main - name: Ensure that scripts is in the user's path ansible.builtin.lineinfile: - path: "{{ ansible_user_home }}/dotfiles/zsh/.zshrc" + path: "{{ ansible_user_dir }}/dotfiles/zsh/.zshrc" line: 'export PATH="$HOME/scripts:$PATH"' state: present