{ config, pkgs, ... }: { programs.vscode = { enable = true; package = pkgs.vscodium; mutableExtensionsDir = false; profiles = { default = { enableUpdateCheck = false; enableExtensionUpdateCheck = false; extensions = with pkgs.vscode-extensions; [ bbenoist.nix brettm12345.nixfmt-vscode dendron.dendron-markdown-preview-enhanced github.copilot github.copilot-chat jnoortheen.nix-ide ms-python.debugpy ms-python.pylint ms-python.python ms-python.vscode-pylance ms-vscode-remote.remote-ssh ms-vscode-remote.remote-ssh-edit redhat.vscode-xml redhat.vscode-yaml yy0931.vscode-sqlite3-editor ]; userSettings = { "editor" = { "defaultFormatter" = "brettm12345.nixfmt-vscode"; "fontFamily" = "fira-code-nerd, FiraCode Nerd Font, Consolas, 'Courier New', monospace"; "fontLigatures" = true; "renderWhitespace" = "all"; }; "explorer" = { "confirmDelete" = false; "confirmDragAndDrop" = false; }; "git" = { "confirmSync" = false; "enableSmartCommit" = true; }; "github" = { "copilot.nextEditSuggestions.enabled" = true; "copilot.enable" = { "nix" = true; }; }; "[json]" = { "editor.defaultFormatter" = "vscode.json-language-features"; }; "nix" = { "enableLanguageServer" = true; "formatterPath" = "nixpkgs-fmt"; "serverPath" = "nixd"; "serverSettings" = { "nixd" = { "formatting" = { "command" = [ "nixpkgs-fmt" ]; }; "options" = { # By default, this entriy will be read from `import { }`. # You can write arbitary Nix expressions here, to produce valid "options" declaration result. # Tip: for flake-based configuration, utilize `builtins.getFlake` "nixos" = { "expr" = "(builtins.getFlake \"${config.home.homeDirectory}/nix-config\").nixosConfigurations..options"; }; "home-manager" = { "expr" = "(builtins.getFlake \"${config.home.homeDirectory}/nix-config\").homeConfigurations..options"; }; # # Tip: use ${workspaceFolder} variable to define path # "nix-darwin" = { # "expr" = "(builtins.getFlake \"${workspaceFolder}/path/to/flake\").darwinConfigurations..options" # } }; }; }; }; "[nix]" = { "editor" = { "defaultFormatter" = "brettm12345.nixfmt-vscode"; "tabSize" = 2; }; }; "security.workspace.trust.untrustedFiles" = "open"; "workbench" = { "colorCustomizations" = null; "editorAssociations" = { "*.db" = "default"; }; }; }; }; }; }; }