Files
nix/hosts/common/configs/user/gui/vscode/default.nix
Nikolaos Karaolidis 02fce06e94 Update
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2025-08-31 13:06:33 +03:00

104 lines
3.9 KiB
Nix

{ user, home }:
{
config,
lib,
pkgs,
...
}:
let
hmConfig = config.home-manager.users.${user};
in
{
# FIXME: https://github.com/microsoft/vscode/issues/3884
# Also for Discord, but those guys are even bigger bastards.
environment.persistence."/persist/state"."${home}/.config/Code" = { };
home-manager.users.${user} = {
programs.vscode = {
enable = true;
mutableExtensionsDir = false;
profiles.default = {
extensions = with pkgs.vscode-extensions; [
mkhl.direnv
mhutchie.git-graph
ms-vsliveshare.vsliveshare
ms-vscode-remote.remote-ssh
naumovs.color-highlight
];
userSettings = {
"diffEditor.ignoreTrimWhitespace" = false;
"editor.accessibilitySupport" = "off";
"editor.cursorBlinking" = "phase";
"editor.cursorSmoothCaretAnimation" = "on";
"editor.fontFamily" = builtins.concatStringsSep ", " hmConfig.theme.font.monospace.names;
"editor.fontLigatures" = true;
"editor.fontSize" = hmConfig.theme.font.size;
"editor.formatOnPaste" = true;
"editor.formatOnSave" = true;
"editor.formatOnType" = true;
"editor.indentSize" = "tabSize";
"editor.inlineSuggest.enabled" = true;
"editor.largeFileOptimizations" = false;
"editor.linkedEditing" = true;
"editor.renderFinalNewline" = "on";
"editor.smoothScrolling" = true;
"editor.stickyScroll.enabled" = true;
"editor.suggestSelection" = "first";
"editor.tabSize" = 2;
"editor.unicodeHighlight.includeComments" = true;
"editor.unicodeHighlight.nonBasicASCII" = true;
"explorer.confirmDelete" = false;
"explorer.confirmDragAndDrop" = false;
"explorer.confirmPasteNative" = false;
"extensions.autoCheckUpdates" = false;
"extensions.autoUpdate" = false;
"extensions.ignoreRecommendations" = true;
"files.autoSave" = "afterDelay";
"files.enableTrash" = false;
"files.eol" = "\n";
"files.insertFinalNewline" = true;
"files.trimFinalNewlines" = true;
"files.trimTrailingWhitespace" = true;
"git.allowForcePush" = true;
"git.alwaysSignOff" = true;
"git.autofetch" = true;
"git.blame.editorDecoration.enabled" = true;
"git.closeDiffOnOperation" = true;
"git.confirmForcePush" = false;
"git.confirmSync" = false;
"git.discardUntrackedChangesToTrash" = false;
"git.enableCommitSigning" = true;
"git.enableSmartCommit" = true;
"git.ignoreRebaseWarning" = true;
"git.openRepositoryInParentFolders" = "always";
"git.path" = lib.meta.getExe pkgs.git;
"mergeEditor.diffAlgorithm" = "advanced";
"security.workspace.trust.enabled" = false;
"telemetry.telemetryLevel" = "off";
"terminal.external.linuxExec" = "kitty";
"terminal.integrated.confirmOnExit" = "hasChildProcesses";
"terminal.integrated.copyOnSelection" = true;
"terminal.integrated.fontFamily" =
builtins.concatStringsSep ", " hmConfig.theme.font.monospace.names;
"terminal.integrated.fontSize" = hmConfig.theme.font.size;
"terminal.integrated.smoothScrolling" = true;
"update.mode" = "none";
"window.autoDetectColorScheme" = true;
"window.autoDetectHighContrast" = false;
"window.menuBarVisibility" = "toggle";
"workbench.editor.historyBasedLanguageDetection" = true;
"workbench.list.smoothScrolling" = true;
};
};
};
home.file.".vscode/argv.json".source = (pkgs.formats.json { }).generate "argv.json" {
enable-crash-reporter = false;
crash-reporter-id = "00000000-0000-0000-0000-000000000000";
password-store = "basic";
};
};
}