mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 21:49:48 +01:00
30 lines
684 B
Nix
30 lines
684 B
Nix
|
{ pkgs, ... }:
|
||
|
|
||
|
let
|
||
|
|
||
|
settingsPath = if pkgs.stdenv.hostPlatform.isDarwin then
|
||
|
"Library/Application Support/Code/User/settings.json"
|
||
|
else
|
||
|
".config/Code/User/settings.json";
|
||
|
|
||
|
expectedSettings = pkgs.writeText "settings-expected.json" ''
|
||
|
{
|
||
|
"extensions.autoCheckUpdates": false,
|
||
|
"update.mode": "none"
|
||
|
}
|
||
|
'';
|
||
|
|
||
|
in {
|
||
|
programs.vscode = {
|
||
|
enable = true;
|
||
|
package = pkgs.writeScriptBin "vscode" "" // { pname = "vscode"; };
|
||
|
enableUpdateCheck = false;
|
||
|
enableExtensionUpdateCheck = false;
|
||
|
};
|
||
|
|
||
|
nmt.script = ''
|
||
|
assertFileExists "home-files/${settingsPath}"
|
||
|
assertFileContent "home-files/${settingsPath}" "${expectedSettings}"
|
||
|
'';
|
||
|
}
|