From e916b8ca781a2c2afdc25bf48a4f562b386f97ee Mon Sep 17 00:00:00 2001 From: materus Date: Wed, 1 Apr 2026 17:43:05 +0200 Subject: [PATCH] Add theia to .gitignore. VSCodium config. neovim theme change --- .gitignore | 3 +- config/editor/neovim/lua/materus/init.lua | 8 +- flake.nix | 2 + nix-config/host/materusPC/configuration.nix | 6 - .../host/materusPC/home-manager/materus.nix | 119 +++++++++++++++++- 5 files changed, 127 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index ab386ab..fd45a1c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ \#*\# -.vscode \ No newline at end of file +.vscode +.theia \ No newline at end of file diff --git a/config/editor/neovim/lua/materus/init.lua b/config/editor/neovim/lua/materus/init.lua index 0547473..a74982a 100644 --- a/config/editor/neovim/lua/materus/init.lua +++ b/config/editor/neovim/lua/materus/init.lua @@ -73,10 +73,13 @@ if vim.fn.executable("git") == 1 then lazy = false, }, { - "mofiqul/dracula.nvim", + "samharju/synthweave.nvim", lazy = false, priority = 1000, - opts = {} + opts = {}, + config = function() + vim.cmd.colorscheme("synthweave") + end }, { "romgrk/barbar.nvim", @@ -145,5 +148,4 @@ if vim.fn.executable("git") == 1 then } require('nvim-treesitter').install { 'lua' } end - vim.cmd [[colorscheme dracula]] end diff --git a/flake.nix b/flake.nix index e2e3422..d32c138 100644 --- a/flake.nix +++ b/flake.nix @@ -61,6 +61,7 @@ sys-nixpkgs = if stable then nixpkgs else nixpkgs-unstable; materusArgs = { inherit files; + inherit arch; inputs = inp; flake-path = path; host-path = path + "/nix-config/host/${host}"; @@ -96,6 +97,7 @@ }; materusArgs = { inherit files; + inherit arch; inputs = inp; flake-path = path; home-path = path + "/nix-config/home/${user}"; diff --git a/nix-config/host/materusPC/configuration.nix b/nix-config/host/materusPC/configuration.nix index 6546c3c..68382ca 100644 --- a/nix-config/host/materusPC/configuration.nix +++ b/nix-config/host/materusPC/configuration.nix @@ -102,12 +102,6 @@ in kdePackages.kcalc vim nano - (vscodium.fhsWithPackages ( - ps: with ps; [ - nixfmt-rfc-style - nixd - ] - )) obsidian git-crypt diff --git a/nix-config/host/materusPC/home-manager/materus.nix b/nix-config/host/materusPC/home-manager/materus.nix index 085568f..4bc6c58 100644 --- a/nix-config/host/materusPC/home-manager/materus.nix +++ b/nix-config/host/materusPC/home-manager/materus.nix @@ -1,4 +1,13 @@ -{ pkgs, materusArgs, config, ... }: +{ + pkgs, + materusArgs, + config, + lib, + ... +}: +let + jsonFormat = pkgs.formats.json { }; +in { mkk.neovim.enable = true; @@ -31,7 +40,115 @@ libreoffice-qt6-fresh + direnv + jsonnet + jsonnet-language-server ]; + + programs.vscode = { + enable = true; + mutableExtensionsDir = true; + profiles.default.enableExtensionUpdateCheck = true; + profiles.default.extensions = + let + market = ( + materusArgs.inputs.nix-vscode-extensions.extensions."${materusArgs.arch}".forVSCodeVersion + config.programs.vscode.package.version + ); + marketNv = (materusArgs.inputs.nix-vscode-extensions.extensions."${materusArgs.arch}"); + in + with market.vscode-marketplace; + with marketNv.vscode-marketplace; + [ + # Python + #ms-python.vscode-pylance + ms-python.python + ms-python.debugpy + ms-python.vscode-python-envs + + # Git + eamodio.gitlens + donjayamanne.githistory + waderyan.gitblame + codezombiech.gitignore + + # Lua + sumneko.lua + + # VSCode + kerrickstaley.layered-settings + mkhl.direnv + betterthantomorrow.joyride + robbowen.synthwave-vscode + + # Jsonnet + grafana.vscode-jsonnet + + # Nix + jnoortheen.nix-ide + ]; + package = ( + pkgs.vscodium.fhsWithPackages ( + ps: with ps; [ + nixfmt-rfc-style + nixd + direnv + jsonnet + jsonnet-language-server + ] + ) + ); + }; + + xdg.configFile."VSCodium/User/settings.nix.jsonnet".enable = false; + home.activation.mutableFileGeneration = + let + source = jsonFormat.generate "settings.nix" { + + "window.dialogStyle" = "custom"; + "window.titleBarStyle" = "custom"; + "workbench.colorTheme" = "SynthWave '84"; + "editor.fontFamily" = "'Hack Nerd Font', 'monospace', monospace"; + + "direnv.path.executable" = "${pkgs.direnv}/bin/direnv"; + + "typescript.tsserver.maxTsServerMemory" = 1024 * 8; + "typescript.tsserver.nodePath" = "${pkgs.nodejs}/bin/node"; + + "nix.enableLanguageServer" = true; + "nix.formatterPath" = "${pkgs.nixfmt-rfc-style}/bin/nixfmt"; + "nix.serverPath" = "${pkgs.nixd}/bin/nixd"; + "nix.serverSettings" = { + + "nixd" = { + "nixpkgs" = { + "expr" = "import (builtins.getFlake \"/mkk/config\").inputs.nixpkgs { }"; + }; + "formatting" = { + "command" = [ + "nixfmt" + ]; + }; + "options" = { + "nixos" = { + "expr" = "(builtins.getFlake (builtins.toString \"/mkk/config\" )).nixosConfigurations.materusPC.options"; + }; + "home-manager" = { + "expr" = "(builtins.getFlake (builtins.toString \"/mkk/config\")).homeConfigurations.materus.options"; + }; + }; + }; + }; + }; + target = config.xdg.configFile."VSCodium/User/settings.nix.jsonnet".target; + command = '' + echo "Copying mutable home files for $HOME" + $VERBOSE_ECHO "${source} -> ${target}" + $DRY_RUN_CMD cp --remove-destination --no-preserve=mode ${source} ${target} + ''; + in + (lib.hm.dag.entryAfter [ "linkGeneration" ] command); + xdg.dataFile."java-runtimes/graalvm-oracle-17".source = pkgs.graalvmPackages.graalvm-oracle_17; xdg.dataFile."java-runtimes/graalvm-oracle-latest".source = pkgs.graalvmPackages.graalvm-oracle; xdg.dataFile."java-runtimes/openjdk21".source = pkgs.jdk21;