From 46ff763b46c5102b133b026178a7dd0bf72bf6ae Mon Sep 17 00:00:00 2001 From: seth Date: Sat, 30 Nov 2024 16:46:29 -0500 Subject: [PATCH] chore(modules): cleanup 24.05 backwards compat --- modules/home-manager/kitty.nix | 6 +----- modules/home-manager/kvantum.nix | 24 +++++------------------- tests/nixos.nix | 5 ++--- 3 files changed, 8 insertions(+), 27 deletions(-) diff --git a/modules/home-manager/kitty.nix b/modules/home-manager/kitty.nix index a20c96c2..2a5de8e6 100644 --- a/modules/home-manager/kitty.nix +++ b/modules/home-manager/kitty.nix @@ -3,13 +3,9 @@ let inherit (lib) ctp; cfg = config.programs.kitty.catppuccin; enable = cfg.enable && config.programs.kitty.enable; - - # TODO: Remove after 24.11 is stable - # https://github.com/nix-community/home-manager/pull/5750 - attrName = if (lib.versionAtLeast ctp.getModuleRelease "24.11") then "themeFile" else "theme"; in { options.programs.kitty.catppuccin = ctp.mkCatppuccinOpt { name = "kitty"; }; - config = lib.mkIf enable { programs.kitty.${attrName} = "Catppuccin-${ctp.mkUpper cfg.flavor}"; }; + config = lib.mkIf enable { programs.kitty.themeFile = "Catppuccin-${ctp.mkUpper cfg.flavor}"; }; } diff --git a/modules/home-manager/kvantum.nix b/modules/home-manager/kvantum.nix index ac86b10c..01a6b623 100644 --- a/modules/home-manager/kvantum.nix +++ b/modules/home-manager/kvantum.nix @@ -8,26 +8,12 @@ let cfg = config.qt.style.catppuccin; enable = cfg.enable && config.qt.enable; - flavorCapitalized = lib.ctp.mkUpper cfg.flavor; - accentCapitalized = lib.ctp.mkUpper cfg.accent; - - theme = - if (lib.versionAtLeast lib.ctp.getModuleRelease "24.11") then - pkgs.catppuccin-kvantum.override { - accent = cfg.accent; - variant = cfg.flavor; - } - else - pkgs.catppuccin-kvantum.override { - accent = accentCapitalized; - variant = flavorCapitalized; - }; + theme = pkgs.catppuccin-kvantum.override { + inherit (cfg) accent; + variant = cfg.flavor; + }; - themeName = - if (lib.versionAtLeast lib.ctp.getModuleRelease "24.11") then - "catppuccin-${cfg.flavor}-${cfg.accent}" - else - "Catppuccin-${flavorCapitalized}-${accentCapitalized}"; + themeName = "catppuccin-${cfg.flavor}-${cfg.accent}"; in { options.qt.style.catppuccin = lib.ctp.mkCatppuccinOpt { name = "Kvantum"; } // { diff --git a/tests/nixos.nix b/tests/nixos.nix index 23e1a2a4..f4f079f3 100644 --- a/tests/nixos.nix +++ b/tests/nixos.nix @@ -28,9 +28,8 @@ testers.runNixOSTest { console.enable = true; i18n.inputMethod = { - # TODO: Use this option after 24.11 is stable - # enable = true; - enabled = "fcitx5"; + enable = true; + type = "fcitx5"; }; users.users.test = {