From adacfc47c4c7d2421add89877797eb97c6a69a6b Mon Sep 17 00:00:00 2001 From: punkfairie Date: Fri, 15 Nov 2024 21:33:15 -0800 Subject: [PATCH] feat(home): Qt config --- modules/home/appearance/qt/default.nix | 30 ++++++++++++++++++++++++++ old/home/appearance/qt.nix | 10 --------- 2 files changed, 30 insertions(+), 10 deletions(-) create mode 100644 modules/home/appearance/qt/default.nix delete mode 100644 old/home/appearance/qt.nix diff --git a/modules/home/appearance/qt/default.nix b/modules/home/appearance/qt/default.nix new file mode 100644 index 0000000..1b5fcf2 --- /dev/null +++ b/modules/home/appearance/qt/default.nix @@ -0,0 +1,30 @@ +{ + lib, + config, + namespace, + inputs, + ... +}: +let + inherit (lib) mkIf; + inherit (lib.${namespace}) mkEnableModule; + + cfg = config.${namespace}.appearance.qt; + inherit (config.${namespace}) theme; +in +{ + options.appearance = mkEnableModule "qt"; + + config = mkIf cfg.enable { + xdg.configFile = mkIf (theme.colors.base == "rose-pine") { + "qt5ct/colors/rose-pine.conf" = { + source = "${inputs.rose-pine-qt5ct}/rose-pine.conf"; + }; + }; + + qt = { + enable = true; + style.name = "adwaita"; + }; + }; +} diff --git a/old/home/appearance/qt.nix b/old/home/appearance/qt.nix deleted file mode 100644 index 1045c9c..0000000 --- a/old/home/appearance/qt.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ flake, ... }: -{ - xdg.configFile."qt5ct/colors/rose-pine.conf".source = "${flake.inputs.rose-pine-qt5ct}/rose-pine.conf"; - - qt = { - enable = true; - - style.name = "adwaita"; - }; -}