diff options
| author | Caroline Larimore <caroline@larimo.re> | 2025-04-14 19:01:38 -0700 |
|---|---|---|
| committer | Caroline Larimore <caroline@larimo.re> | 2025-04-14 19:01:38 -0700 |
| commit | e8077fde966e051fc449fffcfa061c7f7edc47b0 (patch) | |
| tree | a0b1ce60f2718f90c64e924ed8df8d5d4f0d2289 /modules/home/apps/vscode/default.nix | |
| parent | e486d896215e7ef04438809952bc7317512d5765 (diff) | |
migration: finalize
Diffstat (limited to 'modules/home/apps/vscode/default.nix')
| -rw-r--r-- | modules/home/apps/vscode/default.nix | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/modules/home/apps/vscode/default.nix b/modules/home/apps/vscode/default.nix new file mode 100644 index 0000000..bf4b5da --- /dev/null +++ b/modules/home/apps/vscode/default.nix @@ -0,0 +1,75 @@ +{ options, config, lib, pkgs, namespace, ... }: + +with lib; with lib.${namespace}; let + cfg = config.${namespace}.apps.vscode; +in { + options.${namespace}.apps.vscode = with types; { + enable = mkEnableOption "vscode"; + }; + + config = mkIf cfg.enable { + programs.vscode = { + enable = true; + package = pkgs.vscodium; + + extensions = with pkgs.vscode-extensions; [ + jdinhlife.gruvbox + vscode-icons-team.vscode-icons + + jnoortheen.nix-ide + golang.go + ziglang.vscode-zig + ] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ + { + name = "shader"; + publisher = "slevesque"; + version = "1.1.5"; + sha256 = "sha256-Pf37FeQMNlv74f7LMz9+CKscF6UjTZ7ZpcaZFKtX2ZM="; + } + { + name = "yuck"; + publisher = "eww-yuck"; + version = "0.0.3"; + sha256 = "sha256-DITgLedaO0Ifrttu+ZXkiaVA7Ua5RXc4jXQHPYLqrcM="; + } + ]; + + userSettings = { + "workbench.colorTheme" = "Gruvbox Dark Medium"; + "workbench.iconTheme" = "vscode-icons"; + "window.titleBarStyle" = "custom"; + "editor.fontFamily" = "monospace"; + + "git.confirmSync" = false; + + "vsicons.dontShowNewVersionMessage" = true; + + "files.associations" = { + "*.vsh" = "glsl"; + "*.fsh" = "glsl"; + "*.gsh" = "glsl"; + }; + + # Zig + "zig.initialSetupDone" = true; + "zig.path" = ""; + "zig.formattingProvider" = "off"; + + "zig.zls.path" = ""; + "zig.zls.enableAutofix" = false; + "zig.zls.enableInlayHints" = false; + }; + }; + + xdg.desktopEntries.nixeditor = { + name = "NixOS Config"; + genericName = "Edit in VSCode"; + icon = "nix-snowflake"; + exec = "${pkgs.vscodium}/bin/codium /etc/nixos"; + }; + + home.shellAliases = { + "c" = "codium ."; + }; + }; +} |