1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-24 02:39:48 +01:00

zellij: switch config lang from yaml to kdl for 0.32.0

This commit is contained in:
h7x4 2022-11-21 23:06:46 +01:00 committed by Robert Helgesson
parent fce9dbfeb4
commit c03d1e75a1
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -33,7 +33,7 @@ in {
example = literalExpression ''
{
theme = "custom";
themes.custom.fg = 5;
themes.custom.fg = "#ffffff";
}
'';
description = ''
@ -49,8 +49,16 @@ in {
config = mkIf cfg.enable {
home.packages = [ cfg.package ];
home.file."${configDir}/config.yaml" = mkIf (cfg.settings != { }) {
source = yamlFormat.generate "zellij.yaml" cfg.settings;
};
# Zellij switched from yaml to KDL in version 0.32.0:
# https://github.com/zellij-org/zellij/releases/tag/v0.32.0
home.file."${configDir}/config.yaml" = mkIf
(cfg.settings != { } && (versionOlder cfg.package.version "0.32.0")) {
source = yamlFormat.generate "zellij.yaml" cfg.settings;
};
home.file."${configDir}/config.kdl" = mkIf
(cfg.settings != { } && (versionAtleast cfg.package.version "0.32.0")) {
text = lib.hm.generators.toKDL { } cfg.settings;
};
};
}