home-manager/programs/neovide: improve the conditional for settings file

This commit is contained in:
Gabriel Arazas 2024-03-06 16:29:24 +08:00
parent fd6d903108
commit f6d6a4acae
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -40,12 +40,14 @@ in
}; };
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable (lib.mkMerge [
home.packages = [ cfg.package ]; {
home.packages = [ cfg.package ];
}
xdg.configFile."neovide/config.toml".source = (lib.mkIf (cfg.settings != { }) {
lib.mkIf xdg.configFile."neovide/config.toml".source =
(cfg.settings != { }) settingsFormat.generate "home-manager-neovide-settings" cfg.settings;
(settingsFormat.generate "home-manager-neovide-settings" cfg.settings); })
}; ]);
} }