2022-03-09 21:11:42 +00:00
|
|
|
{ config, pkgs, ... }: let
|
|
|
|
configDir = "Code";
|
|
|
|
userDir = if pkgs.stdenv.hostPlatform.isDarwin then
|
2022-03-09 21:12:56 +00:00
|
|
|
"Library/Application Support/${configDir}/User"
|
2022-03-09 21:11:42 +00:00
|
|
|
else
|
|
|
|
"${config.xdg.configHome}/${configDir}/User";
|
|
|
|
in {
|
2021-12-21 14:00:09 +00:00
|
|
|
programs.vscode = {
|
|
|
|
enable = true;
|
|
|
|
userSettings = {
|
2022-01-29 18:06:26 +00:00
|
|
|
"editor.tabSize" = 4;
|
|
|
|
"workbench.preferredDarkColorTheme" = "SynthWave '84";
|
2021-12-21 15:26:21 +00:00
|
|
|
"editor.fontSize" = 24;
|
|
|
|
"editor.fontFamily" = "'Comic Code'";
|
|
|
|
"terminal.integrated.fontSize" = 24;
|
|
|
|
"editor.codeLensFontFamily" = "'Comic Code'";
|
|
|
|
"editor.inlayHints.fontFamily" = "'Comic Code'";
|
|
|
|
"markdown.preview.fontFamily" = "'Comic Code'";
|
|
|
|
"terminal.integrated.fontFamily" = "'Comic Code'";
|
|
|
|
"files.autoSave" = "afterDelay";
|
2022-01-17 19:55:34 +00:00
|
|
|
"synthwave84.disableGlow" = true;
|
2021-12-21 14:00:09 +00:00
|
|
|
};
|
|
|
|
};
|
2022-03-09 21:05:56 +00:00
|
|
|
# make config changeable
|
|
|
|
home = {
|
|
|
|
activation = {
|
|
|
|
afterWriteBoundary = {
|
|
|
|
after = [ "writeBoundary" ];
|
|
|
|
before = [ ];
|
|
|
|
data = ''
|
2022-03-09 21:12:56 +00:00
|
|
|
vscodeDir="$HOME/${userDir}"
|
2022-03-09 21:13:43 +00:00
|
|
|
$DRY_RUN_CMD cat "$vscodeDir/settings.json" > "$vscodeDir/settings_whatever.json"
|
|
|
|
$DRY_RUN_CMD rm -f "$vscodeDir/settings.json"
|
|
|
|
$DRY_RUN_CMD cp "$vscodeDir/settings_whatever.json" "$vscodeDir/settings.json"
|
2022-03-09 21:05:56 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2021-12-21 15:26:21 +00:00
|
|
|
}
|