From f6d6a4acaeb8863b8ac32b1206c9e76a873bba03 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Wed, 6 Mar 2024 16:29:24 +0800 Subject: [PATCH] home-manager/programs/neovide: improve the conditional for settings file --- modules/home-manager/programs/neovide.nix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/home-manager/programs/neovide.nix b/modules/home-manager/programs/neovide.nix index ff5ca0bd..7af3f55c 100644 --- a/modules/home-manager/programs/neovide.nix +++ b/modules/home-manager/programs/neovide.nix @@ -40,12 +40,14 @@ in }; }; - config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; + config = lib.mkIf cfg.enable (lib.mkMerge [ + { + home.packages = [ cfg.package ]; + } - xdg.configFile."neovide/config.toml".source = - lib.mkIf - (cfg.settings != { }) - (settingsFormat.generate "home-manager-neovide-settings" cfg.settings); - }; + (lib.mkIf (cfg.settings != { }) { + xdg.configFile."neovide/config.toml".source = + settingsFormat.generate "home-manager-neovide-settings" cfg.settings; + }) + ]); }