diff options
| author | schererleander <leander@schererleander.de> | 2026-01-09 16:57:15 +0100 |
|---|---|---|
| committer | schererleander <leander@schererleander.de> | 2026-01-09 23:13:49 +0100 |
| commit | 3b5a73c436eb22e0cda59469263490705e149cb9 (patch) | |
| tree | ae3f20ca6008b11f71247dfc6e2df8218de9b95c /modules/users/editors/vscode | |
| parent | ec45aae780da92e12cf82c5a32e336b14b7540ba (diff) | |
refactor: use flake-parts, change modules structure
Diffstat (limited to 'modules/users/editors/vscode')
| -rw-r--r-- | modules/users/editors/vscode/default.nix | 142 |
1 files changed, 0 insertions, 142 deletions
diff --git a/modules/users/editors/vscode/default.nix b/modules/users/editors/vscode/default.nix deleted file mode 100644 index fe2c444..0000000 --- a/modules/users/editors/vscode/default.nix +++ /dev/null @@ -1,142 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: - -let - inherit (lib) - mkOption - types - mkIf - optionals - ; - cfg = config.nx.editors.vscode; -in -{ - options.nx.editors.vscode = { - enable = mkOption { - description = "vscode editor"; - type = types.bool; - default = false; - }; - - useVSCodium = mkOption { - description = "Use vscodium instead of vscode"; - type = types.bool; - default = false; - }; - - theme = mkOption { - description = "Theme to use for vscode"; - type = types.enum [ - "minimal" - "dark" - "light" - ]; - default = "minimal"; - }; - - langs = { - cmake = mkOption { - description = "enable cmake integration"; - type = types.bool; - default = false; - }; - docker = mkOption { - description = "enable docker integration"; - type = types.bool; - default = false; - }; - python = mkOption { - description = "enable python integration"; - type = types.bool; - default = false; - }; - go = mkOption { - description = "enable go integration"; - type = types.bool; - default = false; - }; - rust = mkOption { - description = "enable rust integration"; - type = types.bool; - default = false; - }; - java = mkOption { - description = "enable java integration"; - type = types.bool; - default = false; - }; - lua = mkOption { - description = "enable lua integration"; - type = types.bool; - default = false; - }; - tailwindcss = mkOption { - description = "enable tailwindcss integration"; - type = types.bool; - default = false; - }; - }; - }; - - config = mkIf cfg.enable { - programs.vscode = { - enable = true; - package = if cfg.useVSCodium then pkgs.vscodium else pkgs.vscode; - mutableExtensionsDir = false; - profiles.default = { - enableUpdateCheck = true; - enableExtensionUpdateCheck = true; - - userSettings = { - "update.mode" = "none"; - "workbench.colorTheme" = - if cfg.theme == "minimal" then - "Minimal" - else if cfg.theme == "dark" then - "Default Dark Modern" - else - "Default Light Modern"; - "editor.fontFamily" = "monospace"; - "editor.tabSize" = 2; - "editor.minimap.enabled" = false; - "terminal.integrated.cursorStyle" = "underline"; - "terminal.integrated.cursorStyleInactive" = "underline"; - "terminal.integrated.fontFamily" = "monospace"; - "terminal.integrated.fontSize" = 13; - "git.autofetch" = true; - "window.controlsStyle" = "custom"; - }; - - extensions = - with pkgs.vscode-extensions; - [ - github.copilot - adpyke.codesnap - esbenp.prettier-vscode - ] - ++ (optionals cfg.langs.cmake [ ms-vscode.cmake-tools ]) - ++ (optionals cfg.langs.docker [ ms-azuretools.vscode-docker ]) - ++ (optionals cfg.langs.python [ ms-python.python ]) - ++ (optionals cfg.langs.go [ golang.go ]) - ++ (optionals cfg.langs.rust [ rust-lang.rust-analyzer ]) - ++ (optionals cfg.langs.java [ vscjava.vscode-maven ]) - ++ (optionals cfg.langs.lua [ sumneko.lua ]) - ++ (optionals cfg.langs.tailwindcss [ bradlc.vscode-tailwindcss ]) - ++ (optionals (cfg.theme == "minimal") ( - pkgs.vscode-utils.extensionsFromVscodeMarketplace [ - { - name = "minimalist-dark"; - publisher = "nichabosh"; - version = "1.0.0"; - sha256 = "sha256-lw+Scfada6DycLdRT2Cz+Fd12JucglIrw3uRd2ZhabQ="; - } - ] - )); - }; - }; - }; -} |
