From e02aca950fba2843083264832473e5856541cb08 Mon Sep 17 00:00:00 2001 From: pinkcreeper100 <35699052+pinkcreeper100@users.noreply.github.com> Date: Thu, 27 Jun 2024 03:58:11 +0100 Subject: [PATCH] fix(home-manager): assert `qt.platformTheme.name` for kvantum (#244) * fix(home-manager): assert `qt.platformTheme.name` for kvantum * fix(home-manager): account for qt.platformTheme being null Co-authored-by: seth * chore(modules): set `qt.platformTheme.name` in tests --------- Co-authored-by: seth --- modules/home-manager/kvantum.nix | 4 ++++ test.nix | 1 + 2 files changed, 5 insertions(+) diff --git a/modules/home-manager/kvantum.nix b/modules/home-manager/kvantum.nix index 8809ea7..b73c0c6 100644 --- a/modules/home-manager/kvantum.nix +++ b/modules/home-manager/kvantum.nix @@ -39,6 +39,10 @@ in ]; message = ''`qt.style.name` must be `"kvantum"` to use `qt.style.catppuccin`''; } + { + assertion = lib.elem (config.qt.platformTheme.name or null) [ "kvantum" ]; + message = ''`qt.platformTheme.name` must be set to `"kvantum"` to use `qt.style.catppuccin`''; + } ]; xdg.configFile = { diff --git a/test.nix b/test.nix index 6b73ce8..86eccfa 100644 --- a/test.nix +++ b/test.nix @@ -121,6 +121,7 @@ testers.runNixOSTest { }; qt = enable // { + platformTheme.name = "kvantum"; style.name = "kvantum"; };