zellij: Allow using extraConfig without settings

Fixes https://github.com/nix-community/home-manager/issues/8015
This commit is contained in:
Dietrich Daroch 2025-10-19 11:40:58 -03:00 committed by Austin Horstman
parent c3a5e5f0df
commit 84e1adb0cd
5 changed files with 61 additions and 5 deletions

View file

@ -274,12 +274,15 @@ in
{
"zellij/config.yaml" =
mkIf (cfg.settings != { } && (lib.versionOlder cfg.package.version "0.32.0"))
mkIf ((lib.versionOlder cfg.package.version "0.32.0") && cfg.settings != { })
{
source = yamlFormat.generate "zellij.yaml" cfg.settings;
};
"zellij/config.kdl" =
mkIf (cfg.settings != { } && (lib.versionAtLeast cfg.package.version "0.32.0"))
mkIf
(
(lib.versionAtLeast cfg.package.version "0.32.0") && (cfg.settings != { } || cfg.extraConfig != "")
)
{
text =
(lib.hm.generators.toKDL { } cfg.settings)