mirror of
https://github.com/fscotto/infra.git
synced 2026-07-29 16:20:01 +00:00
93 lines
3.1 KiB
YAML
93 lines
3.1 KiB
YAML
---
|
|
- name: Ensure Hyprland config directories exist
|
|
tags: [dotfiles, dotfiles:desktop, hyprland]
|
|
ansible.builtin.file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
owner: "{{ username }}"
|
|
group: "{{ user_group }}"
|
|
mode: "0755"
|
|
loop:
|
|
- "{{ user_home }}/.config/alacritty"
|
|
- "{{ user_home }}/.config/dunst"
|
|
- "{{ user_home }}/.config/flameshot"
|
|
- "{{ user_home }}/.config/foot"
|
|
- "{{ user_home }}/.config/hypr"
|
|
- "{{ user_home }}/.config/rofi"
|
|
- "{{ user_home }}/.config/waybar"
|
|
when:
|
|
- (desktop_environment | default('minimal')) == 'minimal'
|
|
- "'hyprland' in (desktop_sessions_enabled | default([]))"
|
|
|
|
- name: Install allowed emptty Hyprland Wayland session
|
|
tags: [packages, services, emptty, hyprland]
|
|
ansible.builtin.copy:
|
|
src: hyprland.desktop
|
|
dest: /etc/emptty/wayland-sessions/hyprland.desktop
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
when:
|
|
- (desktop_environment | default('minimal')) == 'minimal'
|
|
- "'hyprland' in (desktop_sessions_enabled | default([]))"
|
|
|
|
- name: Remove legacy Hyprland session launcher shadowing package binary
|
|
tags: [packages, services, hyprland]
|
|
ansible.builtin.file:
|
|
path: /usr/local/bin/start-hyprland
|
|
state: absent
|
|
when:
|
|
- (desktop_environment | default('minimal')) == 'minimal'
|
|
- "'hyprland' in (desktop_sessions_enabled | default([]))"
|
|
|
|
- name: Install Hyprland session launcher in /usr/local/bin
|
|
tags: [packages, services, hyprland]
|
|
ansible.builtin.copy:
|
|
src: "{{ playbook_dir }}/../dotfiles/desktop/.local/bin/start-hyprland-session"
|
|
dest: /usr/local/bin/start-hyprland-session
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
when:
|
|
- (desktop_environment | default('minimal')) == 'minimal'
|
|
- "'hyprland' in (desktop_sessions_enabled | default([]))"
|
|
|
|
- name: Ensure /etc/xdg/xdg-desktop-portal exists for Hyprland
|
|
tags: [packages, services, hyprland, portal]
|
|
ansible.builtin.file:
|
|
path: /etc/xdg/xdg-desktop-portal
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
when:
|
|
- (desktop_environment | default('minimal')) == 'minimal'
|
|
- "'hyprland' in (desktop_sessions_enabled | default([]))"
|
|
|
|
- name: Configure xdg-desktop-portal backend preferences for Hyprland
|
|
tags: [packages, services, hyprland, portal]
|
|
ansible.builtin.copy:
|
|
src: hyprland-portals.conf
|
|
dest: /etc/xdg/xdg-desktop-portal/hyprland-portals.conf
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
when:
|
|
- (desktop_environment | default('minimal')) == 'minimal'
|
|
- "'hyprland' in (desktop_sessions_enabled | default([]))"
|
|
|
|
- name: Copy Hyprland desktop dotfiles
|
|
tags: [dotfiles, dotfiles:desktop, hyprland]
|
|
ansible.builtin.copy:
|
|
src: "{{ playbook_dir }}/../dotfiles/desktop/{{ item.src }}"
|
|
dest: "{{ user_home }}/{{ item.dest }}"
|
|
owner: "{{ username }}"
|
|
group: "{{ user_group }}"
|
|
mode: "{{ item.mode }}"
|
|
loop: "{{ desktop_hyprland_dotfiles | default([]) }}"
|
|
loop_control:
|
|
label: "{{ item.dest }}"
|
|
when:
|
|
- (desktop_environment | default('minimal')) == 'minimal'
|
|
- "'hyprland' in (desktop_sessions_enabled | default([]))"
|