From ef11164c0c930c5dbe48c34a47e3567fc2e9a352 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 28 Nov 2019 16:01:58 -0500 Subject: [PATCH] vscode: don't create an empty settings.json If I enable this module without using the userSettings option it will create an empty settings.json. We use mkIf to prevent this on the default value. --- modules/programs/vscode.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/programs/vscode.nix b/modules/programs/vscode.nix index 319fffb62..b77e7248b 100644 --- a/modules/programs/vscode.nix +++ b/modules/programs/vscode.nix @@ -85,7 +85,10 @@ in foldr (a: b: a // b) { - "${configFilePath}".text = builtins.toJSON cfg.userSettings; + "${configFilePath}" = + mkIf (cfg.userSettings != {}) { + text = builtins.toJSON cfg.userSettings; + }; } toSymlink; };