Compare commits

...
4 Commits
Author SHA1 Message Date
leonhard 6b2bc536f7 fix: fix all the missed errors 2026-11-12 14:38:16 +01:00
leonhard 882d8a6695 chore: flake update 2026-11-12 14:37:58 +01:00
leonhard 0474f7bbb4 refactor: gigantic refactor 2026-11-12 13:26:08 +01:00
leonhard d1e2bde503 fix: remove unused files 2026-11-11 16:48:58 +01:00
58 changed files with 471 additions and 466 deletions

No files matched your search

Generated
+35 -19
View File
@@ -8,11 +8,11 @@
]
},
"locked": {
"lastModified": 1790898470,
"narHash": "sha256-zTwuwezD0w3hpga6a6P8emidzAZFyWqlNeRBlpWOOl8=",
"lastModified": 1793576659,
"narHash": "sha256-V1h85lUaJBQoHFrB2vpXZOE0Ju1MYSnIpsehoVZYlDo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "024633cd702b10285db5cb19b40ad48d2399ba60",
"rev": "ea2630b7470978622c7689a1ff75d2b389175399",
"type": "github"
},
"original": {
@@ -28,11 +28,11 @@
]
},
"locked": {
"lastModified": 1793193205,
"narHash": "sha256-X6xa6sGA7RnJQuZGbFMC+K+KToWAlBDCCjJXfTwEPsw=",
"lastModified": 1794278858,
"narHash": "sha256-rkrJwLgLSHBnXfgoSKIDa+2LLGdTqynsV3GAxOTGhUU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "095fef2f265c3c0da4fe315efba8f8a04495ab34",
"rev": "82ce401aa350502897c3f2e85f384d61cd3b0b6d",
"type": "github"
},
"original": {
@@ -43,11 +43,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1793110635,
"narHash": "sha256-dhoW6VgFWlaodSY5jrBn+CF2FLmaUvDVgM7+C7T2+NM=",
"lastModified": 1794192123,
"narHash": "sha256-SvB8u5qaJAOwZZyZciqTVOg/rBoUs2w0sFTU6ED51AQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "31ecbaca1bdefa45dffc409f0250bd8039ea0010",
"rev": "177d0540942fb205af6993b1d5fa0b57799e09f8",
"type": "github"
},
"original": {
@@ -59,11 +59,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1791487292,
"narHash": "sha256-tqM7xDEsaeK1p6VvRygeZ9LkQRpUUkbRT02BHv6hnTM=",
"lastModified": 1793977579,
"narHash": "sha256-WrSODdZFVIs/Hh2NzC0bY+ROByi0bATg8WfePX8dPj8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8edc0c72e3a38faf5434e40d1f19431125fe4b30",
"rev": "4fe25e12eb9f4c744966dd3de5a05246cf098601",
"type": "github"
},
"original": {
@@ -80,11 +80,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1792203519,
"narHash": "sha256-yJ072hxngo/srNdLTp4BlFeo0hedwnKicI3TGlSXLFE=",
"lastModified": 1794408140,
"narHash": "sha256-vS4BTt6CkLn2BLcYA7kZUxFNnZpPgW0GJ73s/VoPhWc=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "453dc9c5037e6d1bec81d2a51ddacd58a2f44e9c",
"rev": "44849d3d24b28d59fa963bd832ec59c60c56a34c",
"type": "github"
},
"original": {
@@ -98,7 +98,8 @@
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixvim": "nixvim",
"sops-nix": "sops-nix"
"sops-nix": "sops-nix",
"systems": "systems_2"
}
},
"sops-nix": {
@@ -108,11 +109,11 @@
]
},
"locked": {
"lastModified": 1793052255,
"narHash": "sha256-Y/JIHTnMlOabDfyaSBubWGLDIVGihLEUuoMhFvQKaDo=",
"lastModified": 1794261845,
"narHash": "sha256-Ivif/kuD68yEOKcZZG3zSwNMFUuIgzUgeJuzcHrQy+8=",
"owner": "mic92",
"repo": "sops-nix",
"rev": "60182817ee048ac94b4c68ea76d5ef2e8aac730d",
"rev": "fe7b4228405aeac2ce7192c2049a6e2bc8637082",
"type": "github"
},
"original": {
@@ -137,6 +138,21 @@
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1791244623,
"narHash": "sha256-uuanbkFk8a313Zfrxdcz8Us/yQtaxNnKJtX8v0ZPpd8=",
"owner": "nix-systems",
"repo": "default",
"rev": "d36eeed142f88b5a636f2e3856a53c61654cf29b",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
+32 -46
View File
@@ -2,75 +2,61 @@
description = "leonhard's nix config";
inputs = {
systems.url = "github:nix-systems/default";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim.url = "github:nix-community/nixvim";
};
outputs =
{
self,
systems,
nixpkgs,
home-manager,
sops-nix,
nixvim,
...
}@inputs:
let
inherit (self) outputs;
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
homeImports = [
./options.nix
nixvim.homeModules.nixvim
./home-manager/base
];
mkNixosConfig = name: modules: {
"${name}" = nixpkgs.lib.nixosSystem {
modules = modules ++ [
./nixos/base
./options.nix
home-manager.nixosModules.home-manager
sops-nix.nixosModules.sops
{
home-manager = {
useGlobalPkgs = true;
extraSpecialArgs = { inherit inputs outputs; };
backupFileExtension = "hm.bak";
users.leonhard.imports = homeImports ++ [
./home-manager/leonhard
];
};
}
];
specialArgs = { inherit inputs outputs; };
inherit (nixpkgs) lib;
forAllSystems = lib.genAttrs (import systems);
pkgsFor =
system:
import nixpkgs {
inherit system;
config.allowUnfree = true;
};
};
mkHomeConfig = name: modules: {
"${name}" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = modules ++ homeImports;
extraSpecialArgs = { inherit inputs outputs; };
};
};
in
{
nixosConfigurations =
(mkNixosConfig "desktop" [ ./nixos/desktop ]) // (mkNixosConfig "server" [ ./nixos/server ]);
nixosConfigurations = import ./hosts { inherit self inputs; };
homeConfigurations = mkHomeConfig "leonhard" [ ./home-manager/leonhard ];
# 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 (
system:
import ./pkgs {
pkgs = pkgsFor system;
inherit inputs;
}
);
};
}
-52
View File
@@ -1,52 +0,0 @@
{
config,
osConfig ? null,
inputs,
lib,
pkgs,
...
}:
let
mkDefaultSharedAttrs =
base: defaults: lib.mapAttrs (_: v: lib.mkDefault v) (lib.filterAttrs (k: _: base ? ${k}) defaults);
in
{
imports = [
./git.nix
./fish.nix
./nixvim
./hyprland.nix
./kitty.nix
./rofi
];
kekleo = lib.mkIf (osConfig != null) (mkDefaultSharedAttrs config.kekleo (osConfig.kekleo or { }));
nix =
let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in
lib.mkDefault {
package = pkgs.nix;
settings = {
experimental-features = osConfig.nix.settings.experimental-features or "nix-command flakes";
# Opinionated: disable global registry
flake-registry = "";
};
# Opinionated: make flake registry and nix path match flake inputs
registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
};
xdg.enable = true;
programs.home-manager.enable = true;
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "25.11";
}
-30
View File
@@ -1,30 +0,0 @@
{
config,
lib,
...
}:
{
imports = [
./opts.nix
./keymaps.nix
./plugins
];
options.kekleo.neovim.enable = lib.mkEnableOption "neovim";
config = lib.mkIf config.kekleo.neovim.enable {
programs.nixvim = {
enable = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
defaultEditor = true;
colorschemes.tokyonight.enable = true;
clipboard.providers.wl-copy.enable = true;
globals.mapleader = " ";
};
};
}
@@ -1,21 +0,0 @@
{
programs.nixvim = {
plugins = {
blink-indent.enable = true;
blink-pairs.enable = true;
blink-cmp = {
enable = true;
settings = {
signature.enabled = true;
keymap = {
preset = "default";
"<CR>" = [
"accept"
"fallback"
];
};
};
};
};
};
}
-53
View File
@@ -1,53 +0,0 @@
{
programs.nixvim = {
plugins.dap = {
enable = true;
luaConfig.content = ''
local dap = require 'dap'
local dapui = require 'dapui'
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
dap.listeners.before.event_terminated['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;
}
];
};
}
-45
View File
@@ -1,45 +0,0 @@
{ pkgs, ... }:
{
programs.nixvim = {
opts.formatexpr = "v:lua.require'conform'.formatexpr()";
keymaps = [
{
key = "<leader>f";
action.__raw = ''
function() require 'conform'.format { async = true } end
'';
options.desc = "Format Buffer";
}
];
plugins.conform-nvim = {
enable = true;
settings = {
default_format_opts.lsp_format = "fallback";
format_on_save = {
lsp_format = "fallback";
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; [
stylua
nixfmt
ruff
];
};
}
-63
View File
@@ -1,63 +0,0 @@
{
imports = [
./typst.nix
];
programs.nixvim = {
diagnostic.settings = {
severity_sort = true;
float = {
border = "rounded";
source = "if_many";
};
signs.text.__raw = "{
[vim.diagnostic.severity.ERROR] = '󰅚 ',
[vim.diagnostic.severity.WARN] = '󰀪 ',
[vim.diagnostic.severity.INFO] = '󰋽 ',
[vim.diagnostic.severity.HINT] = '󰌶 ',
}";
virtual_text = {
source = "if_many";
spacing = 2;
format.__raw = "
function(diagnostic)
return diagnostic.message
end
";
};
};
plugins = {
lsp = {
enable = true;
keymaps = {
silent = true;
lspBuf = {
"gd" = "definition";
"gD" = "declaration";
"gr" = "references";
"gI" = "implementation";
"<leader>ca" = "code_action";
"<leader>D" = "type_definition";
"<leader>rn" = "rename";
};
};
servers = {
lua_ls.enable = true;
nil_ls.enable = true;
basedpyright.enable = true;
ts_ls.enable = true;
vue_ls.enable = true;
rust_analyzer = {
enable = true;
installCargo = false;
installRustc = false;
};
clangd.enable = true;
};
};
};
};
}
@@ -1,14 +0,0 @@
{ pkgs, ... }:
{
programs.nixvim = {
plugins.treesitter = {
enable = true;
highlight.enable = true;
indent.enable = true;
};
extraPackages = with pkgs; [
gcc
];
};
}
@@ -1,19 +0,0 @@
{
lib,
config,
...
}:
{
options.kekleo.neovim.typst.enable = lib.mkEnableOption "typst editing";
config = {
programs.nixvim = lib.mkIf config.kekleo.neovim.typst.enable {
dependencies.tinymist.enable = true;
dependencies.websocat.enable = true;
plugins.typst-preview.enable = true;
plugins.lsp.servers.tinymist.enable = true;
};
};
}
@@ -1,3 +0,0 @@
{
programs.nixvim.plugins.which-key.enable = true;
}
-9
View File
@@ -1,9 +0,0 @@
{
home = {
username = "leonhard";
homeDirectory = "/home/leonhard";
};
kekleo.neovim.enable = true;
kekleo.neovim.typst.enable = true;
}
+18
View File
@@ -0,0 +1,18 @@
{
imports = [
./git.nix
./firefox.nix
./fish.nix
./nixvim.nix
./hyprland.nix
./kitty.nix
./rofi
];
home = {
username = "leonhard";
homeDirectory = "/home/leonhard";
};
xdg.enable = true;
}
+1 -1
View File
@@ -4,7 +4,7 @@
...
}:
{
config = lib.mkIf config.kekleo.graphical {
config = lib.mkIf config.nix-leonhard.graphical {
programs.firefox.enable = true;
};
}
File renamed without changes.
File renamed without changes.
@@ -6,7 +6,7 @@
}:
{
config = lib.mkIf config.kekleo.graphical {
config = lib.mkIf config.nix-leonhard.graphical {
home.packages = with pkgs; [ nordzy-cursor-theme ];
programs.waybar.enable = true;
@@ -5,7 +5,7 @@
...
}:
{
config = lib.mkIf config.kekleo.graphical {
config = lib.mkIf config.nix-leonhard.graphical {
programs.kitty = {
enable = true;
themeFile = "tokyo_night_night";
+14
View File
@@ -0,0 +1,14 @@
{
config,
lib,
pkgs,
self,
...
}:
{
options.nix-leonhard.neovim.enable = lib.mkEnableOption "neovim";
config = lib.mkIf config.nix-leonhard.neovim.enable {
home.packages = [ self.packages.${pkgs.system}.nixvim ];
};
}
@@ -4,7 +4,7 @@
...
}:
{
config = lib.mkIf config.kekleo.graphical {
config = lib.mkIf config.nix-leonhard.graphical {
programs.rofi = {
enable = true;
theme = ./tokyonight.rasi;
File renamed without changes.
+30
View File
@@ -0,0 +1,30 @@
{
self,
inputs,
...
}:
let
inherit (inputs.nixpkgs.lib) nixosSystem;
specialArgs = { inherit inputs self; };
mkNixosSystem =
modules:
nixosSystem {
inherit specialArgs;
modules = modules ++ [
../system
../options.nix
inputs.home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.leonhard = ../home/default.nix;
}
];
};
in
{
desktop = mkNixosSystem [ ./desktop ];
server = mkNixosSystem [ ./server ];
}
File renamed without changes.
@@ -1,5 +1,6 @@
{
config,
lib,
...
}:
{
@@ -11,13 +12,21 @@
./vaultwarden.nix
];
kekleo.graphical = false;
options.nix-leonhard.domain =
with lib.types;
lib.mkOption {
type = str;
default = "";
description = "Domain of the device.";
};
nix-leonhard.graphical = false;
users.users.leonhard = {
initialPassword = "leonhard";
isNormalUser = true;
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = config.kekleo.publicKeys;
openssh.authorizedKeys.keys = config.nix-leonhard.publicKeys;
};
networking = {
@@ -53,9 +62,9 @@
security.acme = {
acceptTerms = true;
defaults.email = "admin@${config.kekleo.domain}";
defaults.email = "admin@${config.nix-leonhard.domain}";
defaults.webroot = "/var/lib/acme/acme-challenge/";
certs.${config.kekleo.domain} = {
certs.${config.nix-leonhard.domain} = {
group = config.services.nginx.group;
};
};
@@ -63,9 +72,9 @@
services.nginx = {
enable = true;
virtualHosts.${config.kekleo.domain} = {
virtualHosts.${config.nix-leonhard.domain} = {
forceSSL = true;
useACMEHost = config.kekleo.domain;
useACMEHost = config.nix-leonhard.domain;
locations."/.well-known/".root = config.security.acme.defaults.webroot;
};
};
File renamed without changes.
File renamed without changes.
@@ -3,7 +3,7 @@
...
}:
let
domain = config.kekleo.domain;
domain = config.nix-leonhard.domain;
gitDomain = "git.${domain}";
in
{
@@ -24,7 +24,7 @@ in
virtualHosts.${gitDomain} = {
forceSSL = true;
useACMEHost = config.kekleo.domain;
useACMEHost = config.nix-leonhard.domain;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.gitea.settings.server.HTTP_PORT}";
proxyWebsockets = true;
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
@@ -3,7 +3,7 @@
...
}:
let
domain = config.kekleo.domain;
domain = config.nix-leonhard.domain;
vaultDomain = "bitwarden.${domain}";
in
{
@@ -29,7 +29,7 @@ in
virtualHosts.${vaultDomain} = {
forceSSL = true;
useACMEHost = config.kekleo.domain;
useACMEHost = config.nix-leonhard.domain;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.vaultwarden.config.ROCKET_PORT}";
proxyWebsockets = true;
Binary file not shown.
+1 -11
View File
@@ -3,17 +3,7 @@
...
}:
{
options.kekleo = with lib.types; {
domain = lib.mkOption {
type = str;
default = "";
description = "Domain of the device.";
};
publicKeys = lib.mkOption {
type = listOf str;
default = [ ];
description = "List of public keys to use for ssh login, secret encryption, etc.";
};
options.nix-leonhard = with lib.types; {
graphical = lib.mkOption {
type = bool;
default = true;
-24
View File
@@ -1,24 +0,0 @@
# This file defines overlays
{ inputs, ... }:
{
# This one brings our custom packages from the 'pkgs' directory
additions = final: _prev: import ../pkgs final.pkgs;
# This one contains whatever you want to overlay
# You can change versions, add patches, set compilation flags, anything really.
# https://nixos.wiki/wiki/Overlays
modifications = final: prev: {
# example = prev.example.overrideAttrs (oldAttrs: rec {
# ...
# });
};
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
# be accessible through 'pkgs.unstable'
unstable-packages = final: _prev: {
unstable = import inputs.nixpkgs-unstable {
system = final.system;
config.allowUnfree = true;
};
};
}
+11 -4
View File
@@ -1,5 +1,12 @@
# Custom packages, that can be defined similarly to ones from nixpkgs
# You can build them using 'nix build .#example'
pkgs: {
# example = pkgs.callPackage ./example { };
{
pkgs,
inputs,
...
}:
{
nixvim =
(inputs.nixvim.lib.evalNixvim {
inherit (pkgs) system;
modules = [ ./nixvim ];
}).config.build.package;
}
+16
View File
@@ -0,0 +1,16 @@
{
imports = [
./opts.nix
./keymaps.nix
./plugins
];
viAlias = true;
vimAlias = true;
colorschemes.tokyonight.enable = true;
clipboard.providers.wl-copy.enable = true;
globals.mapleader = " ";
}
@@ -1,5 +1,5 @@
{
programs.nixvim.keymaps = [
keymaps = [
{
mode = "n";
key = "<Esc>";
@@ -1,5 +1,5 @@
{
programs.nixvim.opts = {
opts = {
number = true;
relativenumber = true;
showmode = false;
+19
View File
@@ -0,0 +1,19 @@
{
plugins = {
blink-indent.enable = true;
blink-pairs.enable = true;
blink-cmp = {
enable = true;
settings = {
signature.enabled = true;
keymap = {
preset = "default";
"<CR>" = [
"accept"
"fallback"
];
};
};
};
};
}
+51
View File
@@ -0,0 +1,51 @@
{
plugins.dap = {
enable = true;
luaConfig.content = ''
local dap = require 'dap'
local dapui = require 'dapui'
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
dap.listeners.before.event_terminated['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;
}
];
}
@@ -11,9 +11,7 @@
./which-key.nix
];
programs.nixvim = {
extraPlugins = with pkgs.vimPlugins; [
vim-sleuth
];
};
extraPlugins = with pkgs.vimPlugins; [
vim-sleuth
];
}
+43
View File
@@ -0,0 +1,43 @@
{ pkgs, ... }:
{
opts.formatexpr = "v:lua.require'conform'.formatexpr()";
keymaps = [
{
key = "<leader>f";
action.__raw = ''
function() require 'conform'.format { async = true } end
'';
options.desc = "Format Buffer";
}
];
plugins.conform-nvim = {
enable = true;
settings = {
default_format_opts.lsp_format = "fallback";
format_on_save = {
lsp_format = "fallback";
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; [
stylua
nixfmt
ruff
];
}
+61
View File
@@ -0,0 +1,61 @@
{
imports = [
./typst.nix
];
diagnostic.settings = {
severity_sort = true;
float = {
border = "rounded";
source = "if_many";
};
signs.text.__raw = "{
[vim.diagnostic.severity.ERROR] = '󰅚 ',
[vim.diagnostic.severity.WARN] = '󰀪 ',
[vim.diagnostic.severity.INFO] = '󰋽 ',
[vim.diagnostic.severity.HINT] = '󰌶 ',
}";
virtual_text = {
source = "if_many";
spacing = 2;
format.__raw = "
function(diagnostic)
return diagnostic.message
end
";
};
};
plugins = {
lsp = {
enable = true;
keymaps = {
silent = true;
lspBuf = {
"gd" = "definition";
"gD" = "declaration";
"gr" = "references";
"gI" = "implementation";
"<leader>ca" = "code_action";
"<leader>D" = "type_definition";
"<leader>rn" = "rename";
};
};
servers = {
lua_ls.enable = true;
nil_ls.enable = true;
basedpyright.enable = true;
ts_ls.enable = true;
vue_ls.enable = true;
rust_analyzer = {
enable = true;
installCargo = false;
installRustc = false;
};
clangd.enable = true;
};
};
};
}
@@ -1,5 +1,5 @@
{
programs.nixvim.plugins.lualine = {
plugins.lualine = {
enable = true;
settings = {
options = {
@@ -1,10 +1,6 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
ripgrep
];
programs.nixvim.plugins.telescope = {
plugins.telescope = {
enable = true;
extensions.fzf-native.enable = true;
keymaps = {
@@ -43,4 +39,7 @@
"%.ipynb"
];
};
extraPackages = with pkgs; [
ripgrep
];
}
+12
View File
@@ -0,0 +1,12 @@
{ pkgs, ... }:
{
plugins.treesitter = {
enable = true;
highlight.enable = true;
indent.enable = true;
};
extraPackages = with pkgs; [
gcc
];
}
+8
View File
@@ -0,0 +1,8 @@
{
dependencies.tinymist.enable = true;
dependencies.websocat.enable = true;
plugins.typst-preview.enable = true;
plugins.lsp.servers.tinymist.enable = true;
}
+3
View File
@@ -0,0 +1,3 @@
{
plugins.which-key.enable = true;
}
+29
View File
@@ -0,0 +1,29 @@
{
config,
lib,
pkgs,
inputs,
...
}:
{
nix =
let
flakeInputs = lib.filterAttrs (_: v: lib.isType "flake" v) inputs;
in
{
package = pkgs.nix;
# pin the registry to avoid downloading and evaling a new nixpkgs version every time
registry = lib.mapAttrs (_: v: { flake = v; }) flakeInputs;
# set the path for channels compat
nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
settings.experimental-features = "nix-command flakes";
};
programs.home-manager.enable = true;
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "25.11";
}
+23
View File
@@ -0,0 +1,23 @@
{
pkgs,
self,
inputs,
...
}:
let
inherit (inputs.home-manager.lib) homeManagerConfiguration;
extraSpecialArgs = { inherit self inputs; };
in
homeManagerConfiguration {
inherit pkgs extraSpecialArgs;
modules = [
./base.nix
../home
../options.nix
{
nix-leonhard.graphical = false;
nix-leonhard.neovim.enable = true;
}
];
}
+1 -24
View File
@@ -1,38 +1,15 @@
{
inputs,
lib,
pkgs,
...
}:
{
imports = [
./fish.nix
./firefox.nix
./hyprland.nix
./ly.nix
./nix.nix
];
nix =
let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in
{
settings = {
experimental-features = [
"nix-command"
"flakes"
];
# Opinionated: disable global registry
flake-registry = "";
};
# Opinionated: disable channels
channel.enable = false;
# Opinionated: make flake registry and nix path match flake inputs
registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
};
environment.systemPackages = with pkgs; [
vim
wget
File renamed without changes.
@@ -4,7 +4,7 @@
...
}:
{
config = lib.mkIf config.kekleo.graphical {
config = lib.mkIf config.nix-leonhard.graphical {
programs.hyprland.enable = true;
};
}
+1 -1
View File
@@ -4,7 +4,7 @@
...
}:
{
config = lib.mkIf config.kekleo.graphical {
config = lib.mkIf config.nix-leonhard.graphical {
services.displayManager.ly.enable = true;
};
}
+29
View File
@@ -0,0 +1,29 @@
{
config,
lib,
pkgs,
inputs,
...
}:
{
nix =
let
flakeInputs = lib.filterAttrs (_: v: lib.isType "flake" v) inputs;
in
{
package = pkgs.nix;
# pin the registry to avoid downloading and evaling a new nixpkgs version every time
registry = lib.mapAttrs (_: v: { flake = v; }) flakeInputs;
# set the path for channels compat
nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
settings.experimental-features = [
"nix-command"
"flakes"
];
channel.enable = false;
};
}