Remove Hyprland and FreeBSD desktop profiles

This commit is contained in:
Fabio Scotto di Santolo
2026-08-19 14:21:20 +02:00
parent 6e27569dc3
commit e5a330dab0
40 changed files with 15 additions and 1212 deletions

View File

@@ -7,21 +7,6 @@
(
(freebsd_packages_base | default([]))
+ (freebsd_development_packages | default([]))
+ (
(freebsd_desktop_common_packages | default([]))
if 'graphical_desktop' in group_names
else []
)
+ (
(freebsd_hyprland_packages | default([]))
if 'desktop_hyprland' in group_names
else []
)
+ (
(freebsd_niri_packages | default([]))
if 'desktop_niri' in group_names
else []
)
+ (host_packages | default([]))
)
| unique

View File

@@ -60,14 +60,6 @@
)
else []
)
+ (
(desktop_hyprland_packages | default([]))
if (
(desktop_environment | default('minimal')) == 'minimal'
and 'hyprland' in (desktop_sessions_enabled | default([]))
)
else []
)
+ (
(desktop_niri_packages | default([]))
if (
@@ -87,7 +79,6 @@
(
(desktop_minimal_packages | default([]))
+ (desktop_sway_packages | default([]))
+ (desktop_hyprland_packages | default([]))
+ (desktop_niri_packages | default([]))
)
| unique

View File

@@ -5,7 +5,7 @@
that:
- (desktop_environment | default('minimal')) == 'minimal'
- (desktop_sessions_enabled | default([]) | length > 0)
- (desktop_sessions_enabled | default([]) | difference(['sway', 'hyprland', 'niri']) | length == 0)
- (desktop_sessions_enabled | default([]) | difference(['sway', 'niri']) | length == 0)
- desktop_default_session in (desktop_sessions_enabled | default([]))
fail_msg: >-
desktop_environment must be minimal. Minimal desktops also require

View File

@@ -19,20 +19,3 @@
- (desktop_environment | default('minimal')) == 'minimal'
- "'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:
- (desktop_environment | default('minimal')) == 'minimal'
- "'hyprland' in (desktop_sessions_enabled | default([]))"
- (host_hyprland_dotfiles | default([])) | length > 0

View File

@@ -1,4 +0,0 @@
[preferred]
default=gtk
org.freedesktop.impl.portal.Screenshot=hyprland
org.freedesktop.impl.portal.ScreenCast=hyprland

View File

@@ -1,6 +0,0 @@
[Desktop Entry]
Name=Hyprland
Comment=Hyprland (Wayland)
Exec=/usr/local/bin/start-hyprland-session
Type=Application
DesktopNames=Hyprland

View File

@@ -1,92 +0,0 @@
---
- 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([]))"

View File

@@ -1,4 +0,0 @@
[preferred]
default=gtk
org.freedesktop.impl.portal.Screenshot=hyprland
org.freedesktop.impl.portal.ScreenCast=hyprland

View File

@@ -1,58 +0,0 @@
---
- name: Ensure FreeBSD Hyprland user 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"
- "{{ user_home }}/.config/alacritty"
- "{{ user_home }}/.config/dunst"
- "{{ user_home }}/.config/foot"
- "{{ user_home }}/.config/hypr"
- "{{ user_home }}/.config/rofi"
- "{{ user_home }}/.config/waybar"
- "{{ user_home }}/.local"
- "{{ user_home }}/.local/bin"
- name: Copy common Hyprland desktop dotfiles on FreeBSD
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 }}"
- name: Render FreeBSD Hyprland session launcher
tags: [packages, services, hyprland]
ansible.builtin.template:
src: start-hyprland-session.j2
dest: /usr/local/bin/start-hyprland-session
owner: root
group: wheel
mode: "0755"
- name: Ensure FreeBSD xdg-desktop-portal config directory exists
tags: [packages, services, hyprland, portal]
ansible.builtin.file:
path: "{{ freebsd_xdg_config_dir | default('/usr/local/etc/xdg') }}/xdg-desktop-portal"
state: directory
owner: root
group: wheel
mode: "0755"
- name: Configure xdg-desktop-portal backend preferences for FreeBSD Hyprland
tags: [packages, services, hyprland, portal]
ansible.builtin.copy:
src: hyprland-portals.conf
dest: "{{ freebsd_xdg_config_dir | default('/usr/local/etc/xdg') }}/xdg-desktop-portal/hyprland-portals.conf"
owner: root
group: wheel
mode: "0644"

View File

@@ -1,24 +0,0 @@
#!/bin/sh
[ -r /etc/profile ] && . /etc/profile
[ -r "$HOME/.profile" ] && . "$HOME/.profile"
export XDG_CURRENT_DESKTOP=Hyprland
export XDG_SESSION_DESKTOP=Hyprland
export XDG_SESSION_TYPE=wayland
export MOZ_ENABLE_WAYLAND=1
export QT_QPA_PLATFORM='wayland;xcb'
export _JAVA_AWT_WM_NONREPARENTING=1
export SDL_VIDEODRIVER=wayland
export GDK_BACKEND='wayland,x11'
export SSH_AUTH_SOCK="$HOME/.local/state/ssh-agent/socket"
[ -r "$HOME/.config/hypr/session-env" ] && . "$HOME/.config/hypr/session-env"
if command -v dbus-run-session >/dev/null 2>&1; then
exec dbus-run-session Hyprland
fi
exec Hyprland

View File

@@ -1,41 +0,0 @@
---
- name: Ensure FreeBSD Niri user config directories exist
tags: [dotfiles, dotfiles:desktop, niri]
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0755"
loop:
- "{{ user_home }}/.config"
- "{{ user_home }}/.config/dunst"
- "{{ user_home }}/.config/foot"
- "{{ user_home }}/.config/niri"
- "{{ user_home }}/.config/rofi"
- "{{ user_home }}/.config/waybar"
- "{{ user_home }}/.local"
- "{{ user_home }}/.local/bin"
- "{{ user_home }}/.local/state"
- "{{ user_home }}/.local/state/ssh-agent"
- name: Copy common Niri desktop dotfiles on FreeBSD
tags: [dotfiles, dotfiles:desktop, niri]
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_niri_dotfiles | default([]) }}"
loop_control:
label: "{{ item.dest }}"
- name: Render FreeBSD Niri session launcher
tags: [packages, services, niri]
ansible.builtin.template:
src: start-niri-session.j2
dest: /usr/local/bin/start-niri-session
owner: root
group: wheel
mode: "0755"

View File

@@ -1,24 +0,0 @@
#!/bin/sh
[ -r /etc/profile ] && . /etc/profile
[ -r "$HOME/.profile" ] && . "$HOME/.profile"
export XDG_CURRENT_DESKTOP=niri
export XDG_SESSION_DESKTOP=niri
export XDG_SESSION_TYPE=wayland
export MOZ_ENABLE_WAYLAND=1
export QT_QPA_PLATFORM='wayland;xcb'
export _JAVA_AWT_WM_NONREPARENTING=1
export SDL_VIDEODRIVER=wayland
export GDK_BACKEND='wayland,x11'
export SSH_AUTH_SOCK="$HOME/.local/state/ssh-agent/socket"
[ -r "$HOME/.config/niri/session-env" ] && . "$HOME/.config/niri/session-env"
if command -v dbus-run-session >/dev/null 2>&1; then
exec dbus-run-session niri --session
fi
exec niri --session

View File

@@ -1,20 +1,10 @@
---
- name: Configure FreeBSD rc.conf values
tags: [services, packages]
community.general.sysrc:
name: "{{ item.name }}"
value: "{{ item.value }}"
state: present
loop: "{{ freebsd_rc_conf | default([]) }}"
loop_control:
label: "{{ item.name }}"
- name: Enable FreeBSD rc services
tags: [services, packages]
ansible.builtin.service:
name: "{{ item }}"
enabled: true
state: started
loop: "{{ freebsd_enabled_services | default([]) + host_enabled_services | default([]) }}"
loop: "{{ host_enabled_services | default([]) }}"
loop_control:
label: "{{ item }}"