40 lines
1.2 KiB
Nix
40 lines
1.2 KiB
Nix
{ config, pkgs, ... }: let
|
|
configDir = "Code";
|
|
userDir = if pkgs.stdenv.hostPlatform.isDarwin then
|
|
"Library/Application Support/${configDir}/User"
|
|
else
|
|
"${config.xdg.configHome}/${configDir}/User";
|
|
in {
|
|
programs.vscode = {
|
|
enable = true;
|
|
userSettings = {
|
|
"editor.tabSize" = 4;
|
|
"workbench.preferredDarkColorTheme" = "SynthWave '84";
|
|
"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";
|
|
"synthwave84.disableGlow" = true;
|
|
};
|
|
};
|
|
# make config changeable
|
|
home = {
|
|
activation = {
|
|
afterWriteBoundary = {
|
|
after = [ "writeBoundary" ];
|
|
before = [ ];
|
|
data = ''
|
|
vscodeDir="$HOME/${userDir}"
|
|
$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"
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
}
|