mirror of
https://github.com/fscotto/infra.git
synced 2026-07-29 16:20:01 +00:00
Add Hyprland Void desktop profile
This commit is contained in:
@@ -3,6 +3,7 @@ desktop_protonmail_bridge_cert_path: ~/.var/app/ch.protonmail.protonmail-bridge/
|
||||
|
||||
desktop_sessions_enabled:
|
||||
- sway
|
||||
- hyprland
|
||||
|
||||
desktop_default_session: sway
|
||||
desktop_default_session_env: wayland
|
||||
@@ -215,6 +216,36 @@ desktop_sway_dotfiles:
|
||||
dest: .config/gtklock/
|
||||
mode: preserve
|
||||
|
||||
desktop_hyprland_dotfiles:
|
||||
- name: alacritty config
|
||||
src: .config/alacritty/
|
||||
dest: .config/alacritty/
|
||||
mode: preserve
|
||||
- name: dunst config
|
||||
src: .config/dunst/
|
||||
dest: .config/dunst/
|
||||
mode: preserve
|
||||
- name: flameshot config
|
||||
src: .config/flameshot/
|
||||
dest: .config/flameshot/
|
||||
mode: preserve
|
||||
- name: rofi config
|
||||
src: .config/rofi/
|
||||
dest: .config/rofi/
|
||||
mode: preserve
|
||||
- name: hyprland config
|
||||
src: .config/hypr/
|
||||
dest: .config/hypr/
|
||||
mode: preserve
|
||||
- name: waybar config
|
||||
src: .config/waybar/
|
||||
dest: .config/waybar/
|
||||
mode: preserve
|
||||
- name: foot config
|
||||
src: .config/foot/
|
||||
dest: .config/foot/
|
||||
mode: preserve
|
||||
|
||||
desktop_flatpak_packages:
|
||||
- be.alexandervanhee.gradia
|
||||
- ch.protonmail.protonmail-bridge
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
---
|
||||
void_xbps_repositories:
|
||||
- name: hyprland-void
|
||||
url: https://raw.githubusercontent.com/sofijacom/hyprland-void/repository-x86_64-glibc
|
||||
|
||||
desktop_void_source_tools:
|
||||
- name: st
|
||||
repo: https://codeberg.org/fscotto/st
|
||||
@@ -175,6 +179,25 @@ desktop_sway_packages:
|
||||
- xdg-desktop-portal-wlr
|
||||
- xorg-server-xwayland
|
||||
|
||||
desktop_hyprland_packages:
|
||||
- cliphist
|
||||
- dunst
|
||||
- foot
|
||||
- foot-terminfo
|
||||
- grim
|
||||
- hypridle
|
||||
- hyprland
|
||||
- hyprland-guiutils
|
||||
- hyprlock
|
||||
- hyprpaper
|
||||
- rofi
|
||||
- slurp
|
||||
- SwayOSD
|
||||
- Waybar
|
||||
- wl-clipboard
|
||||
- xdg-desktop-portal-hyprland
|
||||
- xorg-server-xwayland
|
||||
|
||||
profile_packages:
|
||||
- alacritty
|
||||
- bluez
|
||||
|
||||
@@ -3,6 +3,7 @@ hostname: ikaros
|
||||
|
||||
desktop_sessions_enabled:
|
||||
- sway
|
||||
- hyprland
|
||||
|
||||
desktop_default_session: sway
|
||||
desktop_default_session_env: wayland
|
||||
|
||||
@@ -3,6 +3,7 @@ hostname: nymph
|
||||
|
||||
desktop_sessions_enabled:
|
||||
- sway
|
||||
- hyprland
|
||||
|
||||
desktop_default_session: sway
|
||||
desktop_default_session_env: wayland
|
||||
@@ -44,3 +45,14 @@ host_sway_dotfiles:
|
||||
- src: .config/wireplumber/wireplumber.conf.d/60-camera-priority.conf
|
||||
dest: .config/wireplumber/wireplumber.conf.d/60-camera-priority.conf
|
||||
mode: "0644"
|
||||
|
||||
host_hyprland_dotfiles:
|
||||
- src: .config/hypr/host.conf
|
||||
dest: .config/hypr/host.conf
|
||||
mode: "0644"
|
||||
- src: .config/hypr/session-env
|
||||
dest: .config/hypr/session-env
|
||||
mode: "0644"
|
||||
- src: .config/wireplumber/wireplumber.conf.d/60-camera-priority.conf
|
||||
dest: .config/wireplumber/wireplumber.conf.d/60-camera-priority.conf
|
||||
mode: "0644"
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
path: /etc/xbps.d
|
||||
state: directory
|
||||
mode: "0755"
|
||||
when: (host_xbps_repositories | default([])) | length > 0
|
||||
when: (void_xbps_repositories | default([]) + host_xbps_repositories | default([])) | length > 0
|
||||
|
||||
- name: Configure host-specific XBPS repositories
|
||||
- name: Configure Void XBPS repositories
|
||||
tags: [packages]
|
||||
ansible.builtin.copy:
|
||||
dest: "/etc/xbps.d/{{ item.name }}.conf"
|
||||
@@ -16,11 +16,11 @@
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
loop: "{{ host_xbps_repositories | default([]) }}"
|
||||
loop: "{{ void_xbps_repositories | default([]) + host_xbps_repositories | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
register: host_xbps_repository_configs
|
||||
when: (host_xbps_repositories | default([])) | length > 0
|
||||
register: void_xbps_repository_configs
|
||||
when: (void_xbps_repositories | default([]) + host_xbps_repositories | default([])) | length > 0
|
||||
|
||||
- name: Install Void nonfree repository if needed
|
||||
tags: [packages]
|
||||
@@ -37,7 +37,7 @@
|
||||
update_cache: true
|
||||
accept_pubkey: true
|
||||
when: >-
|
||||
(host_xbps_repositories | default([])) | length > 0
|
||||
(void_xbps_repositories | default([]) + host_xbps_repositories | default([])) | length > 0
|
||||
or (void_nonfree_repository is defined and void_nonfree_repository is changed)
|
||||
|
||||
- name: Synchronize and upgrade Void Linux packages
|
||||
@@ -66,6 +66,11 @@
|
||||
if 'sway' in (desktop_sessions_enabled | default([]))
|
||||
else []
|
||||
)
|
||||
+ (
|
||||
(desktop_hyprland_packages | default([]))
|
||||
if 'hyprland' in (desktop_sessions_enabled | default([]))
|
||||
else []
|
||||
)
|
||||
+ (host_packages | default([]))
|
||||
)
|
||||
| unique
|
||||
|
||||
@@ -34,3 +34,18 @@
|
||||
- "'sway' in (desktop_sessions_enabled | default([]))"
|
||||
- (host_sway_dotfiles | default([])) | length > 0
|
||||
|
||||
|
||||
- name: Copy host-specific Hyprland dotfiles
|
||||
tags: [dotfiles, dotfiles:desktop, dotfiles:host, hyprland]
|
||||
ansible.builtin.copy:
|
||||
src: "{{ playbook_dir }}/../dotfiles/{{ hostname }}/{{ item.src }}"
|
||||
dest: "{{ user_home }}/{{ item.dest }}"
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "{{ item.mode }}"
|
||||
loop: "{{ host_hyprland_dotfiles | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.dest }}"
|
||||
when:
|
||||
- "'hyprland' in (desktop_sessions_enabled | default([]))"
|
||||
- (host_hyprland_dotfiles | default([])) | length > 0
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
[preferred]
|
||||
default=gtk
|
||||
org.freedesktop.impl.portal.Screenshot=hyprland
|
||||
org.freedesktop.impl.portal.ScreenCast=hyprland
|
||||
@@ -0,0 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Name=Hyprland
|
||||
Comment=Hyprland (Wayland)
|
||||
Exec=/usr/local/bin/start-hyprland-session
|
||||
Type=Application
|
||||
DesktopNames=Hyprland
|
||||
78
ansible/roles/profile_desktop_hyprland/tasks/main.yml
Normal file
78
ansible/roles/profile_desktop_hyprland/tasks/main.yml
Normal file
@@ -0,0 +1,78 @@
|
||||
---
|
||||
- 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: "'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: "'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: "'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: "'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: "'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: "'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: "'hyprland' in (desktop_sessions_enabled | default([]))"
|
||||
@@ -26,6 +26,7 @@
|
||||
- profile_desktop_common
|
||||
- profile_desktop_i3
|
||||
- profile_desktop_sway
|
||||
- profile_desktop_hyprland
|
||||
- profile_desktop_host
|
||||
|
||||
- hosts: workstation_dev_ubuntu
|
||||
|
||||
Reference in New Issue
Block a user