Skip to content

Commit 7fc702d

Browse files
committed
alacritty: check version to create appropriate attribute
1 parent b78746d commit 7fc702d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

modules/programs/alacritty.nix

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,13 @@ in
9393
theme = "${alacrittyTheme}/share/alacritty-theme/${cfg.theme}.toml";
9494
in
9595
lib.mkIf (cfg.theme != null) (
96-
if lib.versionOlder cfg.package.version "0.14" then
97-
{ general.import = [ theme ]; }
98-
else
99-
{ import = [ theme ]; }
96+
let
97+
cfgVersion = "0.14";
98+
in
99+
lib.mkMerge [
100+
(lib.mkIf (lib.versionOlder cfg.package.version cfgVersion) { general.import = [ theme ]; })
101+
(lib.mkIf (lib.versionAtLeast cfg.package.version cfgVersion) { import = [ theme ]; })
102+
]
100103
);
101104

102105
xdg.configFile."alacritty/alacritty.toml" = lib.mkIf (cfg.settings != { }) {

0 commit comments

Comments
 (0)