diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-02-04 00:08:12 +0100 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-02-04 00:09:07 +0100 |
| commit | 35d16fb5645b21b34f4e828c3a9308636298d726 (patch) | |
| tree | 47958bc8e7ecc933c3ed186677a54f1601c816d6 | |
| parent | 540fbf7ab0b61605deae9e64d51f2c903480ce95 (diff) | |
Add the user configurations in dotfiles via ansible blocks
| -rw-r--r-- | roles/hyprland/tasks/main.yml | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/roles/hyprland/tasks/main.yml b/roles/hyprland/tasks/main.yml index 04b658e6..8217923a 100644 --- a/roles/hyprland/tasks/main.yml +++ b/roles/hyprland/tasks/main.yml @@ -28,12 +28,15 @@ notify: - "Restart greetd" -- name: "Create system config directory" +- name: "Create config directories" become: true ansible.builtin.file: - path: "/etc/hypr" + path: "{{ item }}" state: "directory" mode: "0755" + loop: + - "/etc/hypr" + - "{{ ansible_facts['env']['HOME'] }}/.config/hypr" - name: "Configure system defaults" become: true @@ -62,3 +65,27 @@ dest: "/etc/hypr/hypridle.conf" - src: "hyprland/hyprland.conf.j2" dest: "/etc/hypr/hyprland.conf" + +- name: "Configure user defaults" + block: + - name: "Configure user hyprland configuration" + ansible.builtin.blockinfile: + path: "{{ ansible_facts['env']['HOME'] }}/.config/hypr/hyprland.conf" + state: "present" + prepend_newline: true + append_newline: true + marker: "# ==== {mark} ANSIBLE HYPRLAND CONFIG" + block: | + # System defaults + source = /etc/hypr/hyprland.conf + + - name: "Configure user hypridle configuration" + ansible.builtin.blockinfile: + path: "{{ ansible_facts['env']['HOME'] }}/.config/hypr/hypridle.conf" + state: "present" + prepend_newline: true + append_newline: true + marker: "# ==== {mark} ANSIBLE HYPRLAND CONFIG" + block: | + # System defaults + source = /etc/hypr/hypridle.conf |
