fix: fix all the missed errors

This commit is contained in:
leonhard committed 2026-11-12 14:46:53 +01:00
1 parent 882d8a6695
commit cf6f3772ab
19 files changed
+198 -205

No files matched your search

+10 -1
View File
@@ -40,7 +40,16 @@
{ {
nixosConfigurations = import ./hosts { inherit self inputs; }; nixosConfigurations = import ./hosts { inherit self inputs; };
homeConfigurations = import ./standalone { inherit self inputs; }; # i. e. homeConfigurations.leonhard@x86_64-linux etc.
homeConfigurations = builtins.listToAttrs (
map (system: {
name = "leonhard@${system}";
value = import ./standalone {
pkgs = pkgsFor system;
inherit self inputs;
};
}) (import systems)
);
packages = forAllSystems ( packages = forAllSystems (
system: system:
+2 -1
View File
@@ -1,6 +1,7 @@
{ {
config, config,
lib, lib,
pkgs,
self, self,
... ...
}: }:
@@ -8,6 +9,6 @@
options.nix-leonhard.neovim.enable = lib.mkEnableOption "neovim"; options.nix-leonhard.neovim.enable = lib.mkEnableOption "neovim";
config = lib.mkIf config.nix-leonhard.neovim.enable { config = lib.mkIf config.nix-leonhard.neovim.enable {
home.packages = [ self.packages.nixvim ]; home.packages = [ self.packages.${pkgs.stdenv.hostPlatform.system}.nixvim ];
}; };
} }
+5 -4
View File
@@ -4,8 +4,9 @@
... ...
}: }:
{ {
nixvim = inputs.nixvim.lib.buildNixvimWith { nixvim =
inherit (pkgs) system; (inputs.nixvim.lib.evalNixvim {
modules = [ ./nixvim ]; inherit (pkgs) system;
}; modules = [ ./nixvim ];
}).config.build.package;
} }
+5 -10
View File
@@ -5,17 +5,12 @@
./plugins ./plugins
]; ];
programs.nixvim = { viAlias = true;
enable = true; vimAlias = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
defaultEditor = true;
colorschemes.tokyonight.enable = true; colorschemes.tokyonight.enable = true;
clipboard.providers.wl-copy.enable = true; clipboard.providers.wl-copy.enable = true;
globals.mapleader = " "; globals.mapleader = " ";
};
} }
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
programs.nixvim.keymaps = [ keymaps = [
{ {
mode = "n"; mode = "n";
key = "<Esc>"; key = "<Esc>";
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
programs.nixvim.opts = { opts = {
number = true; number = true;
relativenumber = true; relativenumber = true;
showmode = false; showmode = false;
+13 -15
View File
@@ -1,19 +1,17 @@
{ {
programs.nixvim = { plugins = {
plugins = { blink-indent.enable = true;
blink-indent.enable = true; blink-pairs.enable = true;
blink-pairs.enable = true; blink-cmp = {
blink-cmp = { enable = true;
enable = true; settings = {
settings = { signature.enabled = true;
signature.enabled = true; keymap = {
keymap = { preset = "default";
preset = "default"; "<CR>" = [
"<CR>" = [ "accept"
"accept" "fallback"
"fallback" ];
];
};
}; };
}; };
}; };
+48 -50
View File
@@ -1,53 +1,51 @@
{ {
programs.nixvim = { plugins.dap = {
plugins.dap = { enable = true;
enable = true; luaConfig.content = ''
luaConfig.content = '' local dap = require 'dap'
local dap = require 'dap' local dapui = require 'dapui'
local dapui = require 'dapui' dap.listeners.after.event_initialized['dapui_config'] = dapui.open
dap.listeners.after.event_initialized['dapui_config'] = dapui.open dap.listeners.before.event_terminated['dapui_config'] = dapui.close
dap.listeners.before.event_terminated['dapui_config'] = dapui.close dap.listeners.before.event_exited['dapui_config'] = dapui.close
dap.listeners.before.event_exited['dapui_config'] = dapui.close '';
'';
};
plugins.dap-ui.enable = true;
plugins.dap-python.enable = true;
keymaps = [
{
mode = "n";
key = "<F5>";
action = "<cmd>DapContinue<CR>";
options.desc = "Debug: Start/Continue";
options.silent = true;
}
{
mode = "n";
key = "<F1>";
action = "<cmd>DapStepInto<CR>";
options.desc = "Debug: Step Into";
options.silent = true;
}
{
mode = "n";
key = "<F2>";
action = "<cmd>DapStepOver<CR>";
options.desc = "Debug: Step Over";
options.silent = true;
}
{
mode = "n";
key = "<F3>";
action = "<cmd>DapStepOut<CR>";
options.desc = "Debug: Step Out";
options.silent = true;
}
{
mode = "n";
key = "<leader>b";
action = "<cmd>DapToggleBreakpoint<CR>";
options.desc = "Debug: Toggle Breakpoint";
options.silent = true;
}
];
}; };
plugins.dap-ui.enable = true;
plugins.dap-python.enable = true;
keymaps = [
{
mode = "n";
key = "<F5>";
action = "<cmd>DapContinue<CR>";
options.desc = "Debug: Start/Continue";
options.silent = true;
}
{
mode = "n";
key = "<F1>";
action = "<cmd>DapStepInto<CR>";
options.desc = "Debug: Step Into";
options.silent = true;
}
{
mode = "n";
key = "<F2>";
action = "<cmd>DapStepOver<CR>";
options.desc = "Debug: Step Over";
options.silent = true;
}
{
mode = "n";
key = "<F3>";
action = "<cmd>DapStepOut<CR>";
options.desc = "Debug: Step Out";
options.silent = true;
}
{
mode = "n";
key = "<leader>b";
action = "<cmd>DapToggleBreakpoint<CR>";
options.desc = "Debug: Toggle Breakpoint";
options.silent = true;
}
];
} }
+3 -5
View File
@@ -11,9 +11,7 @@
./which-key.nix ./which-key.nix
]; ];
programs.nixvim = { extraPlugins = with pkgs.vimPlugins; [
extraPlugins = with pkgs.vimPlugins; [ vim-sleuth
vim-sleuth ];
];
};
} }
+35 -37
View File
@@ -1,45 +1,43 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
programs.nixvim = { opts.formatexpr = "v:lua.require'conform'.formatexpr()";
opts.formatexpr = "v:lua.require'conform'.formatexpr()";
keymaps = [ keymaps = [
{ {
key = "<leader>f"; key = "<leader>f";
action.__raw = '' action.__raw = ''
function() require 'conform'.format { async = true } end function() require 'conform'.format { async = true } end
''; '';
options.desc = "Format Buffer"; options.desc = "Format Buffer";
} }
]; ];
plugins.conform-nvim = { plugins.conform-nvim = {
enable = true; enable = true;
settings = { settings = {
default_format_opts.lsp_format = "fallback"; default_format_opts.lsp_format = "fallback";
format_on_save = { format_on_save = {
lsp_format = "fallback"; lsp_format = "fallback";
timeout_ms = 500; timeout_ms = 500;
};
formatters_by_ft = {
c = [ "clang-format" ];
lua = [ "stylua" ];
nix = [ "nixfmt" ];
python = [ "ruff_format" ];
};
formatters.clang-format.prepend_args = [
"--style=file"
"--fallback-style=LLVM"
];
}; };
};
extraPackages = with pkgs; [ formatters_by_ft = {
stylua c = [ "clang-format" ];
nixfmt lua = [ "stylua" ];
ruff nix = [ "nixfmt" ];
]; python = [ "ruff_format" ];
};
formatters.clang-format.prepend_args = [
"--style=file"
"--fallback-style=LLVM"
];
};
}; };
extraPackages = with pkgs; [
stylua
nixfmt
ruff
];
} }
+37 -39
View File
@@ -3,60 +3,58 @@
./typst.nix ./typst.nix
]; ];
programs.nixvim = { diagnostic.settings = {
diagnostic.settings = { severity_sort = true;
severity_sort = true; float = {
float = { border = "rounded";
border = "rounded"; source = "if_many";
source = "if_many"; };
}; signs.text.__raw = "{
signs.text.__raw = "{
[vim.diagnostic.severity.ERROR] = '󰅚 ', [vim.diagnostic.severity.ERROR] = '󰅚 ',
[vim.diagnostic.severity.WARN] = '󰀪 ', [vim.diagnostic.severity.WARN] = '󰀪 ',
[vim.diagnostic.severity.INFO] = '󰋽 ', [vim.diagnostic.severity.INFO] = '󰋽 ',
[vim.diagnostic.severity.HINT] = '󰌶 ', [vim.diagnostic.severity.HINT] = '󰌶 ',
}"; }";
virtual_text = { virtual_text = {
source = "if_many"; source = "if_many";
spacing = 2; spacing = 2;
format.__raw = " format.__raw = "
function(diagnostic) function(diagnostic)
return diagnostic.message return diagnostic.message
end end
"; ";
};
}; };
};
plugins = { plugins = {
lsp = { lsp = {
enable = true; enable = true;
keymaps = { keymaps = {
silent = true; silent = true;
lspBuf = { lspBuf = {
"gd" = "definition"; "gd" = "definition";
"gD" = "declaration"; "gD" = "declaration";
"gr" = "references"; "gr" = "references";
"gI" = "implementation"; "gI" = "implementation";
"<leader>ca" = "code_action"; "<leader>ca" = "code_action";
"<leader>D" = "type_definition"; "<leader>D" = "type_definition";
"<leader>rn" = "rename"; "<leader>rn" = "rename";
};
}; };
};
servers = { servers = {
lua_ls.enable = true; lua_ls.enable = true;
nil_ls.enable = true; nil_ls.enable = true;
basedpyright.enable = true; basedpyright.enable = true;
ts_ls.enable = true; ts_ls.enable = true;
vue_ls.enable = true; vue_ls.enable = true;
rust_analyzer = { rust_analyzer = {
enable = true; enable = true;
installCargo = false; installCargo = false;
installRustc = false; installRustc = false;
};
clangd.enable = true;
}; };
clangd.enable = true;
}; };
}; };
}; };
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
programs.nixvim.plugins.lualine = { plugins.lualine = {
enable = true; enable = true;
settings = { settings = {
options = { options = {
+4 -5
View File
@@ -1,10 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
home.packages = with pkgs; [ plugins.telescope = {
ripgrep
];
programs.nixvim.plugins.telescope = {
enable = true; enable = true;
extensions.fzf-native.enable = true; extensions.fzf-native.enable = true;
keymaps = { keymaps = {
@@ -43,4 +39,7 @@
"%.ipynb" "%.ipynb"
]; ];
}; };
extraPackages = with pkgs; [
ripgrep
];
} }
+8 -10
View File
@@ -1,14 +1,12 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
programs.nixvim = { plugins.treesitter = {
plugins.treesitter = { enable = true;
enable = true; highlight.enable = true;
highlight.enable = true; indent.enable = true;
indent.enable = true;
};
extraPackages = with pkgs; [
gcc
];
}; };
extraPackages = with pkgs; [
gcc
];
} }
+4 -6
View File
@@ -1,10 +1,8 @@
{ {
programs.nixvim = { dependencies.tinymist.enable = true;
dependencies.tinymist.enable = true; dependencies.websocat.enable = true;
dependencies.websocat.enable = true;
plugins.typst-preview.enable = true; plugins.typst-preview.enable = true;
plugins.lsp.servers.tinymist.enable = true; plugins.lsp.servers.tinymist.enable = true;
};
} }
+1 -1
View File
@@ -1,3 +1,3 @@
{ {
programs.nixvim.plugins.which-key.enable = true; plugins.which-key.enable = true;
} }
+3 -2
View File
@@ -1,6 +1,7 @@
{ {
config, config,
lib, lib,
pkgs,
inputs, inputs,
... ...
}: }:
@@ -10,6 +11,8 @@
flakeInputs = lib.filterAttrs (_: v: lib.isType "flake" v) inputs; flakeInputs = lib.filterAttrs (_: v: lib.isType "flake" v) inputs;
in in
{ {
package = pkgs.nix;
# pin the registry to avoid downloading and evaling a new nixpkgs version every time # pin the registry to avoid downloading and evaling a new nixpkgs version every time
registry = lib.mapAttrs (_: v: { flake = v; }) flakeInputs; registry = lib.mapAttrs (_: v: { flake = v; }) flakeInputs;
@@ -17,8 +20,6 @@
nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry; nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
settings.experimental-features = "nix-command flakes"; settings.experimental-features = "nix-command flakes";
channels.enable = false;
}; };
programs.home-manager.enable = true; programs.home-manager.enable = true;
+13 -15
View File
@@ -1,25 +1,23 @@
{ {
pkgs, pkgs,
self,
inputs, inputs,
... ...
}: }:
let let
inherit (inputs.home-manager.lib) homeManagerConfiguration; inherit (inputs.home-manager.lib) homeManagerConfiguration;
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit self inputs; };
in in
{ homeManagerConfiguration {
leonhard = homeManagerConfiguration { inherit pkgs extraSpecialArgs;
inherit pkgs extraSpecialArgs; modules = [
modules = [ ./base.nix
./base.nix ../home
../home ../options.nix
../options.nix {
{ nix-leonhard.graphical = false;
nix-leonhard.graphical = false; nix-leonhard.neovim.enable = true;
nix-leonhard.neovim.enable = true; }
nix-leonhard.neovim.typst.enable = true; ];
}
];
};
} }
+4 -1
View File
@@ -1,6 +1,7 @@
{ {
config, config,
lib, lib,
pkgs,
inputs, inputs,
... ...
}: }:
@@ -10,6 +11,8 @@
flakeInputs = lib.filterAttrs (_: v: lib.isType "flake" v) inputs; flakeInputs = lib.filterAttrs (_: v: lib.isType "flake" v) inputs;
in in
{ {
package = pkgs.nix;
# pin the registry to avoid downloading and evaling a new nixpkgs version every time # pin the registry to avoid downloading and evaling a new nixpkgs version every time
registry = lib.mapAttrs (_: v: { flake = v; }) flakeInputs; registry = lib.mapAttrs (_: v: { flake = v; }) flakeInputs;
@@ -21,6 +24,6 @@
"flakes" "flakes"
]; ];
channels.enable = false; channel.enable = false;
}; };
} }