summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host_vars/desktop.local.ymlbin1064 -> 1042 bytes
-rw-r--r--host_vars/desktop.local.yml.example1
-rw-r--r--host_vars/macbook.local.yml.example1
-rw-r--r--roles/hyprland/defaults/main.yml1
-rw-r--r--roles/hyprland/meta/argument_specs.yml4
-rw-r--r--roles/hyprland/tasks/main.yml7
-rw-r--r--roles/hyprland/templates/uwsm/env.j22
7 files changed, 8 insertions, 8 deletions
diff --git a/host_vars/desktop.local.yml b/host_vars/desktop.local.yml
index 170048d2..b722625e 100644
--- a/host_vars/desktop.local.yml
+++ b/host_vars/desktop.local.yml
Binary files differ
diff --git a/host_vars/desktop.local.yml.example b/host_vars/desktop.local.yml.example
index c8dd0be1..cbafb889 100644
--- a/host_vars/desktop.local.yml.example
+++ b/host_vars/desktop.local.yml.example
@@ -41,7 +41,6 @@ fonts_extra:
- "ttf-dejavu"
- "noto-fonts"
-hyprland_nvidia: true
hyprland_gdk_scale: 2
hyprland_kanshi_profiles: |
profile home {
diff --git a/host_vars/macbook.local.yml.example b/host_vars/macbook.local.yml.example
index a4f87605..95b4f191 100644
--- a/host_vars/macbook.local.yml.example
+++ b/host_vars/macbook.local.yml.example
@@ -54,7 +54,6 @@ firefox_extra_extensions:
installation_mode: "force_installed"
install_url: "https://addons.mozilla.org/firefox/downloads/latest/tabby-window-tab-manager/latest.xpi"
-hyprland_nvidia: false
# Output criteria must be the full "make model serial" string reported by
# `hyprctl monitors` (use "Unknown" for any missing field), not just the
# model name — otherwise the profile silently never matches and kanshi
diff --git a/roles/hyprland/defaults/main.yml b/roles/hyprland/defaults/main.yml
index 3781ee44..6aec17de 100644
--- a/roles/hyprland/defaults/main.yml
+++ b/roles/hyprland/defaults/main.yml
@@ -1,3 +1,2 @@
---
-hyprland_nvidia: false
hyprland_gdk_scale: 1
diff --git a/roles/hyprland/meta/argument_specs.yml b/roles/hyprland/meta/argument_specs.yml
index d5da1e36..accae13f 100644
--- a/roles/hyprland/meta/argument_specs.yml
+++ b/roles/hyprland/meta/argument_specs.yml
@@ -2,10 +2,6 @@
argument_specs:
main:
options:
- hyprland_nvidia:
- type: "bool"
- default: false
- description: "Enable NVIDIA-specific environment variables for Wayland"
hyprland_gdk_scale:
type: "int"
default: 1
diff --git a/roles/hyprland/tasks/main.yml b/roles/hyprland/tasks/main.yml
index d14b556c..4a64956e 100644
--- a/roles/hyprland/tasks/main.yml
+++ b/roles/hyprland/tasks/main.yml
@@ -1,4 +1,11 @@
---
+- name: "Detect NVIDIA driver"
+ ansible.builtin.command:
+ cmd: "modinfo nvidia"
+ register: "hyprland_nvidia_detected"
+ changed_when: false
+ failed_when: false
+
- name: "Ensure hyprland packages are installed"
become: true
ansible.builtin.package:
diff --git a/roles/hyprland/templates/uwsm/env.j2 b/roles/hyprland/templates/uwsm/env.j2
index f0a03b64..f33b1565 100644
--- a/roles/hyprland/templates/uwsm/env.j2
+++ b/roles/hyprland/templates/uwsm/env.j2
@@ -17,7 +17,7 @@ export MOZ_ENABLE_WAYLAND=1
export ELECTRON_OZONE_PLATFORM_HINT=wayland
export OZONE_PLATFORM=wayland
-{% if hyprland_nvidia %}
+{% if hyprland_nvidia_detected.rc == 0 %}
# NVIDIA Wayland support
export LIBVA_DRIVER_NAME=nvidia
export GBM_BACKEND=nvidia-drm