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"; - }; -}