feat: update system

This commit is contained in:
2025-02-01 11:55:20 +01:00
parent 998a7b9166
commit 84004b6391
29 changed files with 430 additions and 203 deletions

162
flake.lock generated
View File

@@ -9,11 +9,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1731092955, "lastModified": 1735301051,
"narHash": "sha256-L1hLXf4IDZ0KoXbFiSNNZJ7IrReEr/J+CLt6Rl4Ea3M=", "narHash": "sha256-jU88Q9tP4vuvWYGQcmOdFwI9e2uMPVYJHbXdiklIH9o=",
"owner": "Kirottu", "owner": "Kirottu",
"repo": "anyrun", "repo": "anyrun",
"rev": "d2017f224b2bfd7e33573c7070e7c3e2960c7dcc", "rev": "06017e753c8886d5296768dca80745ee09402a2d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -30,11 +30,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1728330715, "lastModified": 1735644329,
"narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=", "narHash": "sha256-tO3HrHriyLvipc4xr+Ewtdlo7wM1OjXNjlWRgmM7peY=",
"owner": "numtide", "owner": "numtide",
"repo": "devshell", "repo": "devshell",
"rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef", "rev": "f7795ede5b02664b57035b3b757876703e2c3eac",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -44,29 +44,13 @@
} }
}, },
"flake-compat": { "flake-compat": {
"flake": false,
"locked": { "locked": {
"lastModified": 1717312683, "lastModified": 1733328505,
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=", "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "nix-community", "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"repo": "flake-compat", "revCount": 69,
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"revCount": 57,
"type": "tarball", "type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@@ -102,11 +86,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733312601, "lastModified": 1736143030,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -143,18 +127,14 @@
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
"nixpkgs" "nixpkgs"
],
"nixpkgs-stable": [
"nixvim",
"nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1734425854, "lastModified": 1737465171,
"narHash": "sha256-nzE5UbJ41aPEKf8R2ZFYtLkqPmF7EIUbNEdHMBLg0Ig=", "narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "0ddd26d0925f618c3a5d85a4fa5eb1e23a09491d", "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -192,11 +172,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1734344598, "lastModified": 1737630279,
"narHash": "sha256-wNX3hsScqDdqKWOO87wETUEi7a/QlPVgpC/Lh5rFOuA=", "narHash": "sha256-wJQCxyMRc4P26zDrHmZiRD5bbfcJpqPG3e2djdGG3pk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "83ecd50915a09dca928971139d3a102377a8d242", "rev": "0db5c8bfcce78583ebbde0b2abbc95ad93445f7c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -213,11 +193,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1734344598, "lastModified": 1737480538,
"narHash": "sha256-wNX3hsScqDdqKWOO87wETUEi7a/QlPVgpC/Lh5rFOuA=", "narHash": "sha256-rk/cmrvq3In0TegW9qaAxw+5YpJhRWt2p74/6JStrw0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "83ecd50915a09dca928971139d3a102377a8d242", "rev": "4481a16d1ac5bff4a77c608cefe08c9b9efe840d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -282,11 +262,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733570843, "lastModified": 1737504076,
"narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=", "narHash": "sha256-/B4XJnzYU/6K1ZZOBIgsa3K4pqDJrnC2579c44c+4rI=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "a35b08d09efda83625bef267eb24347b446c80b8", "rev": "65cc1fa8e36ceff067daf6cfb142331f02f524d3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -295,26 +275,19 @@
"type": "github" "type": "github"
} }
}, },
"nixos-cosmic": { "nix-flatpak": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable",
"rust-overlay": "rust-overlay"
},
"locked": { "locked": {
"lastModified": 1734404414, "lastModified": 1734128415,
"narHash": "sha256-c/7bsbMcVMb8c4wiLA142ZQfL08U8qYJROGf9NCkfQE=", "narHash": "sha256-HLwdVNxpuTsLlM3tCkpbQU6yCehdgf3kOS1G2SDlkzY=",
"owner": "lilyinstarlight", "owner": "gmodena",
"repo": "nixos-cosmic", "repo": "nix-flatpak",
"rev": "a364e6a5e9eb93253daf93c747b150e31e09b13c", "rev": "8bdc2540da516006d07b04019eb57ae0781a04b3",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "lilyinstarlight", "owner": "gmodena",
"repo": "nixos-cosmic", "ref": "latest",
"repo": "nix-flatpak",
"type": "github" "type": "github"
} }
}, },
@@ -334,29 +307,13 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable": {
"locked": {
"lastModified": 1734083684,
"narHash": "sha256-5fNndbndxSx5d+C/D0p/VF32xDiJCJzyOqorOYW4JEo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "314e12ba369ccdb9b352a4db26ff419f7c49fa84",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1734424634, "lastModified": 1737181194,
"narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=", "narHash": "sha256-eoGbMQQTjobtGaPyXInuciinBUWOHG68Ft9zcJer6LE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33", "rev": "947eb2af89cbad3d4ffb8bdd2557c48045b7f497",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -369,7 +326,7 @@
"nixvim": { "nixvim": {
"inputs": { "inputs": {
"devshell": "devshell", "devshell": "devshell",
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat",
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_2",
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
@@ -381,11 +338,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1734567959, "lastModified": 1737645531,
"narHash": "sha256-ghNQlnI/r6cnknY58x60695sFrYnI6ZUMg65bmoNGqw=", "narHash": "sha256-2cLk8KXpFZhMUFg61Fb8ykTp0VWqJSwcg/1o30nDYVo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "37608b462772e35220e02bfbd9045d0946564436", "rev": "e22bb46c8863c30a791a4183aa9013d542cc5be5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -404,11 +361,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733773348, "lastModified": 1737372689,
"narHash": "sha256-Y47y+LesOCkJaLvj+dI/Oa6FAKj/T9sKVKDXLNsViPw=", "narHash": "sha256-nH3zK2ki0fd5o5qvbGHxukE4qnOLJa1uCzoDObG5vrE=",
"owner": "NuschtOS", "owner": "NuschtOS",
"repo": "search", "repo": "search",
"rev": "3051be7f403bff1d1d380e4612f0c70675b44fc9", "rev": "570cc17bbc25650eb7d69e4fcda8cfd2f1656922",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -422,32 +379,11 @@
"anyrun": "anyrun", "anyrun": "anyrun",
"home-manager": "home-manager", "home-manager": "home-manager",
"matugen": "matugen", "matugen": "matugen",
"nixos-cosmic": "nixos-cosmic", "nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"nixvim": "nixvim" "nixvim": "nixvim"
} }
}, },
"rust-overlay": {
"inputs": {
"nixpkgs": [
"nixos-cosmic",
"nixpkgs"
]
},
"locked": {
"lastModified": 1734316514,
"narHash": "sha256-0aLx44yMblcOGpfFXKCzp2GhU5JaE6OTvdU+JYrXiUc=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "83ee8ff74d6294a7657320f16814754c4594127b",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1689347949, "lastModified": 1689347949,
@@ -501,11 +437,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733761991, "lastModified": 1737483750,
"narHash": "sha256-s4DalCDepD22jtKL5Nw6f4LP5UwoMcPzPZgHWjAfqbQ=", "narHash": "sha256-5An1wq5U8sNycOBBg3nsDDgpwBmR9liOpDGlhliA6Xo=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "0ce9d149d99bc383d1f2d85f31f6ebd146e46085", "rev": "f2cc121df15418d028a59c9737d38e3a90fbaf8f",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -14,10 +14,7 @@
url = "github:Kirottu/anyrun"; url = "github:Kirottu/anyrun";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixos-cosmic = { nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
url = "github:lilyinstarlight/nixos-cosmic";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = outputs =
@@ -27,7 +24,7 @@
nixvim, nixvim,
anyrun, anyrun,
matugen, matugen,
nixos-cosmic, nix-flatpak,
... ...
}@inputs: }@inputs:
let let
@@ -47,6 +44,7 @@
(final: prev: { (final: prev: {
anyrunPlugins = anyrun.packages.${prev.system}; anyrunPlugins = anyrun.packages.${prev.system};
matugen = matugen.packages.${prev.system}.default; matugen = matugen.packages.${prev.system}.default;
gccdiag = prev.callPackage ./overlays/gccdiag { };
gbmonctl = prev.callPackage ./overlays/gbmonctl { }; gbmonctl = prev.callPackage ./overlays/gbmonctl { };
lpc21isp = prev.callPackage ./overlays/lpc21isp { }; lpc21isp = prev.callPackage ./overlays/lpc21isp { };
rquickshare = prev.callPackage ./overlays/rquickshare { }; rquickshare = prev.callPackage ./overlays/rquickshare { };
@@ -68,22 +66,13 @@
./modules/nixos ./modules/nixos
./hosts/${hostname} ./hosts/${hostname}
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
nixos-cosmic.nixosModules.default nix-flatpak.nixosModules.nix-flatpak
{
nix.settings = {
substituters = [
"https://cosmic.cachix.org/"
];
trusted-public-keys = [
"cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
];
};
}
{ {
_module.args = { _module.args = {
inherit username; inherit username;
}; };
networking.hostName = hostname; networking.hostName = hostname;
services.flatpak.enable = true;
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
@@ -93,6 +82,7 @@
users.${username} = { users.${username} = {
imports = [ imports = [
matugen.homeManagerModules.default matugen.homeManagerModules.default
nix-flatpak.homeManagerModules.nix-flatpak
./modules/home-manager ./modules/home-manager
./hosts/${hostname}/home.nix ./hosts/${hostname}/home.nix
]; ];

View File

@@ -15,7 +15,6 @@
}; };
}; };
# Bootloader.
boot = { boot = {
quiet.enable = true; quiet.enable = true;
@@ -49,11 +48,8 @@
waybar.enable = true; waybar.enable = true;
dunst.enable = true; dunst.enable = true;
}; };
services.desktopManager.cosmic.enable = true;
services.displayManager.cosmic-greeter.enable = true;
desktops = { desktops = {
hyprland.enable = true; hyprland.enable = true;
# gamescope.enable = true;
}; };
locale.preset.theaninova.enable = true; locale.preset.theaninova.enable = true;
@@ -65,7 +61,7 @@
services.printing = { services.printing = {
enable = true; enable = true;
drivers = with pkgs; [ drivers = with pkgs; [
rastertokpsl-re # rastertokpsl-re
]; ];
}; };

View File

@@ -6,6 +6,7 @@
cachix cachix
# lorri # lorri
vulnix vulnix
gccdiag
# browsers # browsers
firefox firefox
@@ -44,17 +45,19 @@
blender-hip blender-hip
# development # development
insomnia
# TODO: .NET 6 avalonia-ilspy # TODO: .NET 6 avalonia-ilspy
# ghidra # ghidra
# ida-free
# utils # utils
libqalculate libqalculate
ranger ranger
neofetch
filezilla filezilla
yubikey-manager yubikey-manager
# rquickshare (pkgs.writeShellApplication {
name = "fix-yubikey";
text = ''
gpg-connect-agent --hex "scd apdu 00 f1 00 00" /bye
'';
})
]; ];
} }

View File

@@ -1,5 +1,9 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
services.flatpak.update.auto = {
enable = true;
onCalendar = "weekly";
};
programs = { programs = {
home-manager.enable = true; home-manager.enable = true;
rbw = { rbw = {

View File

@@ -6,7 +6,7 @@
fork = true; fork = true;
font = { font = {
normal = [ "FiraCode Nerd Font" ]; normal = [ "FiraCode Nerd Font" ];
size = 12.75; size = 12;
edging = "subpixelantialias"; edging = "subpixelantialias";
hinting = "full"; hinting = "full";
features."FiraCode Nerd Font" = [ features."FiraCode Nerd Font" = [

View File

@@ -46,13 +46,17 @@
enable = true; enable = true;
prettier = true; prettier = true;
}; };
spellcheck.enable = false;
status-line.enable = true; status-line.enable = true;
syntax.enable = true; syntax.enable = true;
tree.enable = true; tree.enable = true;
}; };
languages = { languages = {
angular.enable = true; angular.enable = true;
c.enable = true; c = {
enable = true;
cppcheck = true;
};
css = { css = {
enable = true; enable = true;
stylelint = true; stylelint = true;
@@ -68,21 +72,64 @@
python.enable = true; python.enable = true;
rust.enable = true; rust.enable = true;
shell.enable = true; shell.enable = true;
svelte.enable = true;
}; };
remaps = { remaps = {
half-page-scroll.enable = true; half-page-scroll.enable = true;
no-accidental-macro.enable = true; no-accidental-macro.enable = true;
paste-keep-buffer.enable = true; paste-keep-buffer.enable = true;
wrapped-line-nav.enable = true;
}; };
}; };
extraPlugins = [ pkgs.vimPlugins.tiny-inline-diagnostic-nvim ];
extraConfigLua = ''
require("tiny-inline-diagnostic").setup({
preset = "modern",
hi = {
arrow = "LineNr",
background = "LineNr",
},
options = {
show_source = true,
use_icons_from_diagnostic = true,
add_messages = true,
throttle = 0,
softwrap = 30,
multiple_diag_under_cursor = true,
multilines = {
enabled = true,
always_show = true,
},
show_all_diags_on_cursorline = false,
enable_on_insert = true,
enable_on_select = true,
severity = {
vim.diagnostic.severity.ERROR,
vim.diagnostic.severity.WARN,
vim.diagnostic.severity.INFO,
vim.diagnostic.severity.HINT,
},
},
})
'';
diagnostics.virtual_text = false;
plugins = { plugins = {
leap.enable = true; leap.enable = true;
vim-surround.enable = true; vim-surround.enable = true;
which-key.enable = true; which-key.enable = true;
schemastore.enable = true; schemastore.enable = true;
# TODO: looks weird with neovide comment.enable = true;
# treesitter-context.enable = true; debugprint.enable = true;
todo-comments.enable = true;
treesitter-context = {
enable = false; # TODO: looks weird with Neovide
settings = {
line_numbers = false;
};
};
none-ls.settings.debug = true;
lsp.servers = { lsp.servers = {
html.enable = true; html.enable = true;
@@ -97,7 +144,7 @@
copilot-lua = { copilot-lua = {
enable = true; enable = true;
suggestion.autoTrigger = true; settings.suggestion.auto_trigger = true;
}; };
}; };
} }

View File

@@ -41,8 +41,14 @@ in
snippet.expand = # lua snippet.expand = # lua
"function(args) require('luasnip').lsp_expand(args.body) end"; "function(args) require('luasnip').lsp_expand(args.body) end";
window = { window = {
completion.border = "rounded"; completion = {
documentation.border = "rounded"; border = "solid";
zindex = 10;
};
documentation = {
border = "solid";
zindex = 10;
};
}; };
}; };
}; };

View File

@@ -15,6 +15,7 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
extraConfigLuaPre = # lua extraConfigLuaPre = # lua
'' ''
vim.lsp.set_log_level("off")
require("actions-preview").setup({}) require("actions-preview").setup({})
local signs = { local signs = {
@@ -28,15 +29,19 @@ in
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" }) vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
end end
vim.diagnostic.config({ vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "solid" })
virtual_text = true,
signs = true,
underline = true,
update_in_insert = true,
severity_sort = false,
})
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" })
''; '';
diagnostics = {
signs.text = {
"__rawKey__vim.diagnostic.severity.ERROR" = "";
"__rawKey__vim.diagnostic.severity.WARN" = "";
"__rawKey__vim.diagnostic.severity.INFO" = "";
"__rawKey__vim.diagnostic.severity.HINT" = "󰌵";
};
underline = true;
update_in_insert = true;
severity_sort = true;
};
keymaps = [ keymaps = [
{ {
key = "<leader>sa"; key = "<leader>sa";
@@ -70,9 +75,19 @@ in
action.__raw = # lua action.__raw = # lua
"vim.lsp.buf.hover"; "vim.lsp.buf.hover";
} }
{
key = "<leader>sh";
mode = "n";
options.silent = true;
action.__raw = # lua
"function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({0}), {0}) end";
}
]; ];
plugins = { plugins = {
lsp.enable = true; lsp = {
enable = true;
inlayHints = false;
};
telescope = { telescope = {
enable = true; enable = true;
keymaps = { keymaps = {
@@ -81,7 +96,6 @@ in
"<leader>si" = "lsp_implementations"; "<leader>si" = "lsp_implementations";
"<leader>sw" = "lsp_workspace_symbols"; "<leader>sw" = "lsp_workspace_symbols";
"<leader>st" = "lsp_type_definitions"; "<leader>st" = "lsp_type_definitions";
"<leader>sh" = "diagnostics";
}; };
}; };
inc-rename.enable = true; inc-rename.enable = true;
@@ -133,8 +147,8 @@ in
} }
{ {
__unkeyed-1 = "<leader>sh"; __unkeyed-1 = "<leader>sh";
icon = "󱖫"; icon = "󰞂";
desc = "Diagnostics"; desc = "Inlay Hints";
} }
{ {
__unkeyed-1 = "<leader>sa"; __unkeyed-1 = "<leader>sa";

View File

@@ -0,0 +1,23 @@
{
lib,
config,
hmConfig,
...
}:
let
cfg = config.presets.base.spellcheck;
in
{
options.presets.base.spellcheck = {
enable = lib.mkEnableOption "Spellcheck";
};
config = lib.mkIf cfg.enable {
plugins.lsp.servers.harper_ls = {
enable = true;
settings = {
userDictPath = "${hmConfig.xdg.configHome}/harper-user-dictionary.txt";
};
};
};
}

View File

@@ -32,8 +32,8 @@ in
options = { options = {
globalstatus = true; globalstatus = true;
section_separators = { section_separators = {
left = ""; # ""; left = "";
right = ""; # ""; right = "";
}; };
component_separators = { component_separators = {
left = ""; left = "";
@@ -45,8 +45,8 @@ in
{ {
__unkeyed-1 = "mode"; __unkeyed-1 = "mode";
separator = { separator = {
right = ""; # ""; right = "";
left = ""; # ""; left = "";
}; };
icon = ""; icon = "";
} }
@@ -56,8 +56,8 @@ in
{ {
__unkeyed-1 = "location"; __unkeyed-1 = "location";
separator = { separator = {
right = ""; # ""; right = "";
left = ""; # ""; left = "";
}; };
} }
]; ];

View File

@@ -28,7 +28,7 @@ in
filteredItems.visible = true; filteredItems.visible = true;
}; };
extraSources = [ "document_symbols" ]; extraSources = [ "document_symbols" ];
popupBorderStyle = "rounded"; popupBorderStyle = "solid";
eventHandlers.neo_tree_buffer_leave = # lua eventHandlers.neo_tree_buffer_leave = # lua
'' ''
function() function()

View File

@@ -1,7 +1,10 @@
{ lib, ... }: { lib, pkgs, ... }:
{ {
options.programs.nixvim = lib.mkOption { options.programs.nixvim = lib.mkOption {
type = lib.types.submoduleWith { type = pkgs.lib.types.submoduleWith {
specialArgs = {
inherit pkgs;
};
modules = [ modules = [
./auto-save.nix ./auto-save.nix
./auto-format.nix ./auto-format.nix
@@ -15,6 +18,7 @@
./base/diagnostics.nix ./base/diagnostics.nix
./base/find.nix ./base/find.nix
./base/formatting.nix ./base/formatting.nix
./base/spellcheck.nix
./base/status-line.nix ./base/status-line.nix
./base/syntax.nix ./base/syntax.nix
./base/tree.nix ./base/tree.nix
@@ -29,10 +33,12 @@
./languages/python.nix ./languages/python.nix
./languages/rust.nix ./languages/rust.nix
./languages/shell.nix ./languages/shell.nix
./languages/svelte.nix
./remaps/half-page-scroll.nix ./remaps/half-page-scroll.nix
./remaps/no-accidental-macro.nix ./remaps/no-accidental-macro.nix
./remaps/paste-keep-buffer.nix ./remaps/paste-keep-buffer.nix
./remaps/wrapped-line-nav.nix
]; ];
}; };
}; };

View File

@@ -1,10 +1,15 @@
{ lib, config, ... }: {
lib,
config,
...
}:
let let
cfg = config.presets.languages.c; cfg = config.presets.languages.c;
in in
{ {
options.presets.languages.c = { options.presets.languages.c = {
enable = lib.mkEnableOption "C/C++"; enable = lib.mkEnableOption "C/C++";
cppcheck = lib.mkEnableOption "cppcheck";
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
@@ -13,12 +18,28 @@ in
c = [ "clang-format" ]; c = [ "clang-format" ];
cpp = [ "clang-format" ]; cpp = [ "clang-format" ];
}; };
lsp.servers.clangd = { none-ls = {
enable = true; enable = true;
cmd = [ sources.diagnostics = {
"clangd" cppcheck = lib.mkIf cfg.cppcheck {
"--offset-encoding=utf-16" enable = true;
]; };
};
};
lsp.servers = {
clangd = {
enable = true;
cmd = [
"clangd"
"--offset-encoding=utf-16"
];
settings.InlayHints = {
Designators = true;
Enabled = true;
ParameterNames = true;
DeducedTypes = true;
};
};
}; };
}; };
}; };

View File

@@ -42,7 +42,31 @@ in
} }
]; ];
lsp.servers = { lsp.servers = {
ts_ls.enable = true; ts_ls = {
enable = true;
settings = {
typescript.inlayHints = {
includeInlayParameterNameHints = "all";
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
includeInlayFunctionParameterTypeHints = true;
includeInlayVariableTypeHints = true;
includeInlayVariableTypeHintsWhenTypeMatchesName = true;
includeInlayPropertyDeclarationTypeHints = true;
includeInlayFunctionLikeReturnTypeHints = true;
includeInlayEnumMemberValueHints = true;
};
javascript.inlayHints = {
includeInlayParameterNameHints = "all";
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
includeInlayFunctionParameterTypeHints = true;
includeInlayVariableTypeHints = true;
includeInlayVariableTypeHintsWhenTypeMatchesName = true;
includeInlayPropertyDeclarationTypeHints = true;
includeInlayFunctionLikeReturnTypeHints = true;
includeInlayEnumMemberValueHints = true;
};
};
};
eslint.enable = lib.mkIf cfg.eslint true; eslint.enable = lib.mkIf cfg.eslint true;
}; };
}; };

View File

@@ -15,6 +15,10 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
plugins = { plugins = {
conform-nvim.settings.formatters_by_ft.nix = [ "nixfmt" ]; conform-nvim.settings.formatters_by_ft.nix = [ "nixfmt" ];
none-ls = {
enable = true;
sources.diagnostics.statix.enable = true;
};
lsp.servers.nil_ls.enable = true; lsp.servers.nil_ls.enable = true;
nix.enable = true; nix.enable = true;
}; };

View File

@@ -14,6 +14,28 @@ in
enable = true; enable = true;
installCargo = false; installCargo = false;
installRustc = false; installRustc = false;
settings.inlayHints = {
bindingModeHints.enable = false;
chainingHints.enable = true;
closingBraceHints = {
enable = true;
minLines = 25;
};
closureReturnTypeHints.enable = "never";
lifetimeElisionHints = {
enable = "never";
useParameterNames = false;
};
maxLength = 25;
parameterHints.enable = true;
reborrowHints.enable = "never";
renderColons = true;
typeHints = {
enable = true;
hideClosureInitialization = false;
hideNamedConstructor = false;
};
};
}; };
}; };
}; };

View File

@@ -0,0 +1,27 @@
{
lib,
config,
...
}:
let
cfg = config.presets.languages.svelte;
in
{
options.presets.languages.svelte = {
enable = lib.mkEnableOption "Svelte";
};
config = lib.mkIf cfg.enable {
plugins.lsp.servers.svelte = {
enable = true;
settings.typescript.inlayHints = {
parameterNames.enabled = "all";
parameterTypes.enabled = true;
variableTypes.enabled = true;
propertyDeclarationTypes.enabled = true;
functionLikeReturnTypes.enabled = true;
enumMemberValues.enabled = true;
};
};
};
}

View File

@@ -0,0 +1,22 @@
{ lib, config, ... }:
let
cfg = config.presets.remaps.wrapped-line-nav;
in
{
options.presets.remaps.wrapped-line-nav = {
enable = lib.mkEnableOption "Navigate wrapped lines up and down";
};
config = lib.mkIf cfg.enable {
keymaps = [
{
key = "<up>";
action = "g<up>";
}
{
key = "<down>";
action = "g<down>";
}
];
};
}

View File

@@ -13,7 +13,7 @@ in
key = "<leader>xx"; key = "<leader>xx";
mode = "n"; mode = "n";
action.__raw = # lua action.__raw = # lua
"require('trouble').toggle"; "function() require('trouble').toggle('diagnostics') end";
} }
{ {
key = "<leader>xw"; key = "<leader>xw";
@@ -42,10 +42,7 @@ in
]; ];
plugins = { plugins = {
web-devicons.enable = true; web-devicons.enable = true;
trouble = { trouble.enable = true;
enable = true;
settings.use_diagnostic_signs = true;
};
which-key.settings.spec = [ which-key.settings.spec = [
{ {
__unkeyed-1 = "<leader>x"; __unkeyed-1 = "<leader>x";

View File

@@ -4,14 +4,19 @@ if exists("syntax_on")
endif endif
let g:colors_name="md3-evo" let g:colors_name="md3-evo"
let g:neovide_transparency = {{custom.transparency}} let g:neovide_transparency = 1.0
let g:neovide_floating_corner_radius = 0.5
let g:neovide_normal_opacity = {{custom.transparency}}
let g:neovide_padding_top = {{custom.padding}} let g:neovide_padding_top = {{custom.padding}}
let g:neovide_padding_bottom = {{custom.padding}} let g:neovide_padding_bottom = {{custom.padding}}
let g:neovide_padding_left = {{custom.padding}} let g:neovide_padding_left = {{custom.padding}}
let g:neovide_padding_right = {{custom.padding}} let g:neovide_padding_right = {{custom.padding}}
let g:neovide_floating_blur_amount_x = {{custom.blur}} let g:neovide_floating_blur_amount_x = {{custom.blur}}
let g:neovide_floating_blur_amount_y = {{custom.blur}} let g:neovide_floating_blur_amount_y = {{custom.blur}}
let g:neovide_floating_shadow = 0 let g:neovide_floating_shadow = v:true
let g:neovide_floating_z_height = 10
let g:neovide_light_angle_degrees = 45
let g:neovide_light_radius = 5
let g:terminal_color_0 = "{{colors.surface.default.hex}}" let g:terminal_color_0 = "{{colors.surface.default.hex}}"
let g:terminal_color_1 = "{{colors.red.default.hex}}" let g:terminal_color_1 = "{{colors.red.default.hex}}"
@@ -204,6 +209,8 @@ hi! IlluminatedWordRead gui=none guibg={{colors.surface_container_highest.defaul
hi! IlluminatedWordWrite gui=none guibg={{colors.surface_container_highest.default.hex}} hi! IlluminatedWordWrite gui=none guibg={{colors.surface_container_highest.default.hex}}
hi! MatchParen gui=none guibg={{colors.surface_container_highest.default.hex}} hi! MatchParen gui=none guibg={{colors.surface_container_highest.default.hex}}
hi! LspInlayHint guifg={{colors.on_surface_variant.default.hex}} guibg={{colors.surface_variant.default.hex}}
let g:lualine_theme = { let g:lualine_theme = {
\ "insert": { \ "insert": {
\ "a": {"fg": "{{colors.on_green.default.hex}}", "bg": "{{colors.green.default.hex}}", "gui": "bold"}, \ "a": {"fg": "{{colors.on_green.default.hex}}", "bg": "{{colors.green.default.hex}}", "gui": "bold"},

View File

@@ -34,22 +34,28 @@ in
}; };
}; };
# https://github.com/sjcobb2022/nixos-config/blob/70fb548b961c19e9855d2de86ee9569a7a88d976/hosts/common/optional/greetd.nix#L23C1-L33C2
systemd.services.greetd.serviceConfig = {
Type = "idle";
StandardInput = "tty";
StandardOutput = "tty";
StandardError = "journal"; # Without this errors will spam on screen
# Without these bootlogs will spam on screen
TTYReset = true;
TTYVHangup = true;
TTYVTDisallocate = true;
};
services = { services = {
/* greetd = {
greetd = { enable = true;
enable = true; settings = {
settings = { default_session = {
initial_session = { command = "${pkgs.greetd.tuigreet}/bin/tuigreet --asterisks --remember --remember-session --sessions ${pkgs.hyprland}/share/wayland-sessions";
command = "${pkgs.hyprland}/bin/Hyprland &> /dev/null"; user = username;
user = username;
};
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --asterisks";
user = username;
};
}; };
}; };
*/ };
dbus.enable = true; dbus.enable = true;

View File

@@ -16,7 +16,6 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ pavucontrol ]; environment.systemPackages = with pkgs; [ pavucontrol ];
hardware.pulseaudio.enable = false;
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
enable = true; enable = true;

View File

@@ -18,7 +18,7 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
fonts.fontconfig.subpixel.rgba = "bgr"; fonts.fontconfig.subpixel.rgba = "bgr";
hardware.gbmonctl.enable = true; hardware.gbmonctl.enable = true;
boot.kernelParams = [ "video=3840x2160@120" ]; boot.kernelParams = [ "video=3840x2160@144" ];
home-manager.users.${username} = { home-manager.users.${username} = {
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
@@ -29,7 +29,7 @@ in
mfact = 0.4; mfact = 0.4;
}; };
monitor = [ monitor = [
"DP-3,3840x2160@120,0x0,1,bitdepth,10" "DP-3,3840x2160@144,0x0,1,bitdepth,10"
"DP-3,addreserved,340,0,0,0" "DP-3,addreserved,340,0,0,0"
]; ];
xwayland.force_zero_scaling = true; xwayland.force_zero_scaling = true;

View File

@@ -23,6 +23,7 @@ stdenv.mkDerivation rec {
makeFlags = kernel.makeFlags ++ [ makeFlags = kernel.makeFlags ++ [
"KVERSION=${kernel.modDirVersion}" "KVERSION=${kernel.modDirVersion}"
"KERNEL_SRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "KERNEL_SRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"KBUILD_OUTPUT=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
]; ];
patchPhase = '' patchPhase = ''

View File

@@ -1,5 +1,4 @@
{ {
pkgs,
lib, lib,
config, config,
... ...
@@ -16,7 +15,6 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
boot = { boot = {
# Virtual Camera/Mic
kernelModules = [ kernelModules = [
"v4l2loopback" "v4l2loopback"
"snd-aloop" "snd-aloop"

View File

@@ -2,6 +2,7 @@
config, config,
lib, lib,
pkgs, pkgs,
username,
... ...
}: }:
@@ -20,10 +21,17 @@ in
lpc21isp lpc21isp
dfu-util dfu-util
openscad openscad
bambu-studio
prusa-slicer # gcode viewer!
orca-slicer orca-slicer
freecad
]; ];
home-manager.users.${username} = {
services.flatpak.packages = [
"com.bambulab.BambuStudio"
"org.freecad.FreeCAD"
"com.prusa3d.PrusaSlicer" # gcode viewer!
];
programs = {
lazygit.enable = true;
};
};
}; };
} }

View File

@@ -1,12 +1,11 @@
{ {
lib, lib,
pkgs,
buildGoModule, buildGoModule,
fetchFromGitHub, fetchFromGitHub,
hidapi, hidapi,
udev, udev,
}: }:
buildGoModule rec { buildGoModule {
pname = "gbmonctl"; pname = "gbmonctl";
version = "1d01a090"; version = "1d01a090";
src = fetchFromGitHub { src = fetchFromGitHub {
@@ -28,5 +27,6 @@ buildGoModule rec {
meta = with lib; { meta = with lib; {
description = "A CLI tool to change monitor settings over USB to the Gigabyte M32U"; description = "A CLI tool to change monitor settings over USB to the Gigabyte M32U";
homepage = "https://github.com/kelvie/gbmonctl"; homepage = "https://github.com/kelvie/gbmonctl";
maintainers = with maintainers; [ theaninova ];
}; };
} }

View File

@@ -0,0 +1,66 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchFromGitLab,
boost,
libargs,
cmake,
}:
let
cpmCacheDir = ".cpm";
format = rec {
repo = "Format.cmake";
src = fetchFromGitHub {
owner = "TheLartians";
inherit repo;
rev = "v1.7.2";
hash = "sha256-MFUwJrL0N2wJfj2vkQdKdStPkNJ6AJIYvBhCY6aVpsc=";
};
originHash = "23e9a6cadcf1af689dbf4cd8e9a7edf67ddb0009";
cacheDir = "${lib.toLower repo}/${originHash}";
};
in
stdenv.mkDerivation rec {
pname = "gccdiag";
version = "0.2.6";
src = fetchFromGitLab {
owner = "andrejr";
repo = "gccdiag";
rev = version;
hash = "sha256-Oa4JGHCMnTW9uwxUw/+XCfQCElTAD1ifGQJ3ZFl5mys=";
};
preConfigure = ''
export CPM_SOURCE_CACHE=$sourceRoot/${cpmCacheDir}
mkdir -p "$CPM_SOURCE_CACHE/${format.cacheDir}"
cp -R --no-preserve=mode,ownership "${format.src}" "$CPM_SOURCE_CACHE/${format.cacheDir}"
'';
nativeBuildInputs = [ cmake ];
buildInputs = [
boost
libargs
];
cmakeFlags = [
"-Dgccdiag_USE_CONAN=off"
"-Dgccdiag_SOURCE_DIST=on"
"-DGIT_TAG=v${version}"
"-DSEMVER=${version}"
"-DVERSION=${version}"
"-DPROJECT_VERSION=${version}"
"-DVERSON_MAJOR=${builtins.elemAt (lib.strings.splitString "." version) 0}"
"-DVERSON_MINOR=${builtins.elemAt (lib.strings.splitString "." version) 1}"
"-DVERSON_PATCH=${builtins.elemAt (lib.strings.splitString "." version) 2}"
];
meta = with lib; {
description = "A utility to get gcc (or other compiler) diagnostics for a source file, with appropriate flags extracted from a compilation database";
homepage = "https://gitlab.com/andrejr/gccdiag";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ theaninova ];
};
}