nvim: move to services we do not specify a pkgset

This commit is contained in:
Kevin Baensch 2025-07-05 20:08:20 +02:00
parent 465a6b19d1
commit 26026c7ae1
Signed by: derped
GPG key ID: C0F1D326C7626543
45 changed files with 84 additions and 85 deletions

View file

@ -32,8 +32,21 @@
"latex" "latex"
"mail_utils" "mail_utils"
"nodejs" "nodejs"
"python3"
"xpkgs"
];
services = [
"btrbk"
"btrfs"
"cups"
"desktop"
"desktop::sway"
"impermanence"
"lanzaboote"
"mariaDB"
"mullvad"
"nvim" "nvim"
"nvim::cmp" "nvim::blink"
"nvim::fugitive" "nvim::fugitive"
"nvim::go" "nvim::go"
"nvim::harpoon" "nvim::harpoon"
@ -60,18 +73,6 @@
"nvim::trim" "nvim::trim"
"nvim::undotree" "nvim::undotree"
"nvim::which-key" "nvim::which-key"
"python3"
"xpkgs"
];
services = [
"btrbk"
"btrfs"
"cups"
"desktop"
"desktop::sway"
"impermanence"
"mariaDB"
"mullvad"
"pipewire" "pipewire"
"podman" "podman"
"tmux" "tmux"

View file

@ -24,6 +24,19 @@
"base" "base"
"extra" "extra"
"mail_utils" "mail_utils"
"cpp"
];
services = [
"btrbk"
"btrfs"
"tmux"
"pipewire"
"docker"
"podman"
"ollama"
"virt-manager"
"virtualbox"
"cups"
"nvim" "nvim"
"nvim::cmp" "nvim::cmp"
"nvim::fugitive" "nvim::fugitive"
@ -53,19 +66,6 @@
"nvim::trim" "nvim::trim"
"nvim::undotree" "nvim::undotree"
"nvim::which-key" "nvim::which-key"
"cpp"
];
services = [
"btrbk"
"btrfs"
"tmux"
"pipewire"
"docker"
"podman"
"ollama"
"virt-manager"
"virtualbox"
"cups"
"desktop" "desktop"
"desktop::sway" "desktop::sway"
# "mariaDB" # "mariaDB"

View file

@ -41,6 +41,17 @@ in
pkgs = [ pkgs = [
"base" "base"
"server" "server"
];
services = [
"acme"
"btrbk"
"btrfs"
"fail2ban"
"forgejo"
"impermanence"
"mailserver"
"mariaDB"
"nginx"
"nvim" "nvim"
"nvim::cmp" "nvim::cmp"
"nvim::fugitive" "nvim::fugitive"
@ -57,17 +68,6 @@ in
"nvim::treesitter" "nvim::treesitter"
"nvim::trim" "nvim::trim"
"nvim::undotree" "nvim::undotree"
];
services = [
"acme"
"btrbk"
"btrfs"
"fail2ban"
"forgejo"
"impermanence"
"mailserver"
"mariaDB"
"nginx"
"openssh" "openssh"
"radicale" "radicale"
"tmux" "tmux"

View file

@ -17,7 +17,7 @@ with lib;
fullPath = true; fullPath = true;
}); });
programs.nvim-lazy = mkIf (elem "nvim" config.machine.pkgs) { programs.nvim-lazy = mkIf (elem "nvim" config.machine.services) {
enable = true; enable = true;
luaRcContent = # lua luaRcContent = # lua
'' ''

View file

@ -1,6 +1,6 @@
{ config, lib, ... }: { config, lib, ... }:
lib.mkIf (lib.elem "nvim::blink" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::blink" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
dir = vPlug: vPlug.friendly-snippets; dir = vPlug: vPlug.friendly-snippets;

View file

@ -4,7 +4,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::cmp" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::cmp" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
# Autocompletion # Autocompletion
{ {
@ -21,7 +21,7 @@ lib.mkIf (lib.elem "nvim::cmp" config.machine.pkgs) {
local cmp = require('cmp') local cmp = require('cmp')
cmp.setup({ cmp.setup({
${lib.optionalString (lib.elem "nvim::lsp" config.machine.pkgs) # lua ${lib.optionalString (lib.elem "nvim::lsp" config.machine.services) # lua
''sources = { { name = 'nvim_lsp' }, },'' ''sources = { { name = 'nvim_lsp' }, },''
} }
mapping = cmp.mapping.preset.insert({ mapping = cmp.mapping.preset.insert({

View file

@ -4,7 +4,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::fugitive" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::fugitive" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
lazy = true; lazy = true;

View file

@ -4,7 +4,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::gen" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::gen" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
lazy = true; lazy = true;

View file

@ -4,7 +4,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::go" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::go" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
lazy = true; lazy = true;

View file

@ -4,7 +4,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::harpoon" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::harpoon" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
dir = vPlug: vPlug.harpoon2; dir = vPlug: vPlug.harpoon2;

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::hurl" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::hurl" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
lazy = true; lazy = true;

View file

@ -4,7 +4,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::image" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::image" config.machine.services) {
programs.nvim-lazy = { programs.nvim-lazy = {
lazyPlugins = [ lazyPlugins = [
{ {

View file

@ -4,7 +4,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::kanagawa-nvim" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::kanagawa-nvim" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
dir = vPlug: vPlug.kanagawa-nvim; dir = vPlug: vPlug.kanagawa-nvim;

View file

@ -6,7 +6,7 @@
... ...
}@inputs: }@inputs:
lib.mkIf (lib.elem "nvim::lsp" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::lsp" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
# Yaml schema store for yamlls # Yaml schema store for yamlls
{ {
@ -119,7 +119,7 @@ lib.mkIf (lib.elem "nvim::lsp" config.machine.pkgs) {
local lspconfig = require('lspconfig') local lspconfig = require('lspconfig')
for server, config in pairs(opts.servers) do for server, config in pairs(opts.servers) do
${lib.optionalString (lib.elem "nvim::blink" config.machine.pkgs) # lua ${lib.optionalString (lib.elem "nvim::blink" config.machine.services) # lua
'' ''
-- passing config.capabilities to blink.cmp merges with the capabilities in your -- passing config.capabilities to blink.cmp merges with the capabilities in your
-- `opts[server].capabilities, if you've defined it -- `opts[server].capabilities, if you've defined it

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.optionalAttrs (lib.elem "nvim::lsp::bash" config.machine.pkgs) { lib.optionalAttrs (lib.elem "nvim::lsp::bash" config.machine.services) {
bashls = { bashls = {
cmd = [ cmd = [
"${pkgs.nodePackages.bash-language-server}/bin/bash-language-server" "${pkgs.nodePackages.bash-language-server}/bin/bash-language-server"

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.optionalAttrs (lib.elem "nvim::lsp::c" config.machine.pkgs) { lib.optionalAttrs (lib.elem "nvim::lsp::c" config.machine.services) {
ccls = { ccls = {
cmd = [ "${pkgs.ccls}/bin/ccls" ]; cmd = [ "${pkgs.ccls}/bin/ccls" ];
init_options = { init_options = {

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.optionalAttrs (lib.elem "nvim::lsp::emmet" config.machine.pkgs) { lib.optionalAttrs (lib.elem "nvim::lsp::emmet" config.machine.services) {
emmet_language_server = { emmet_language_server = {
cmd = [ cmd = [
"${pkgs.emmet-language-server}/bin/emmet-language-server" "${pkgs.emmet-language-server}/bin/emmet-language-server"

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.optionalAttrs (lib.elem "nvim::lsp::go" config.machine.pkgs) { lib.optionalAttrs (lib.elem "nvim::lsp::go" config.machine.services) {
gopls = { gopls = {
cmd = [ "${pkgs.gopls}/bin/gopls" ]; cmd = [ "${pkgs.gopls}/bin/gopls" ];
}; };

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.optionalAttrs (lib.elem "nvim::lsp::harper" config.machine.pkgs) { lib.optionalAttrs (lib.elem "nvim::lsp::harper" config.machine.services) {
harper_ls = { harper_ls = {
cmd = [ cmd = [
"${pkgs.harper}/bin/harper-ls" "${pkgs.harper}/bin/harper-ls"

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.optionalAttrs (lib.elem "nvim::lsp::html" config.machine.pkgs) { lib.optionalAttrs (lib.elem "nvim::lsp::html" config.machine.services) {
# local html_capabilities = vim.lsp.protocol.make_client_capabilities() # local html_capabilities = vim.lsp.protocol.make_client_capabilities()
# html_capabilities.textDocument.completion.completionItem.snippetSupport = true # html_capabilities.textDocument.completion.completionItem.snippetSupport = true
html = { html = {

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.optionalAttrs (lib.elem "nvim::lsp::ltex" config.machine.pkgs) { lib.optionalAttrs (lib.elem "nvim::lsp::ltex" config.machine.services) {
ltex = { ltex = {
cmd = [ "${pkgs.ltex-ls}/bin/ltex-ls" ]; cmd = [ "${pkgs.ltex-ls}/bin/ltex-ls" ];
settings = { settings = {

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.optionalAttrs (lib.elem "nvim::lsp::lua" config.machine.pkgs) { lib.optionalAttrs (lib.elem "nvim::lsp::lua" config.machine.services) {
lua_ls = { lua_ls = {
cmd = [ "${pkgs.lua-language-server}/bin/lua-language-server" ]; cmd = [ "${pkgs.lua-language-server}/bin/lua-language-server" ];
settings = { settings = {

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.optionalAttrs (lib.elem "nvim::lsp::markdown" config.machine.pkgs) { lib.optionalAttrs (lib.elem "nvim::lsp::markdown" config.machine.services) {
marksman = { marksman = {
cmd = [ cmd = [
"${pkgs.marksman}/bin/marksman" "${pkgs.marksman}/bin/marksman"

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.optionalAttrs (lib.elem "nvim::lsp::nix-nil" config.machine.pkgs) { lib.optionalAttrs (lib.elem "nvim::lsp::nix-nil" config.machine.services) {
nil_ls = { nil_ls = {
cmd = [ "${pkgs.nil}/bin/nil" ]; cmd = [ "${pkgs.nil}/bin/nil" ];
settings = { settings = {

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.optionalAttrs (lib.elem "nvim::lsp::nix-nixd" config.machine.pkgs) { lib.optionalAttrs (lib.elem "nvim::lsp::nix-nixd" config.machine.services) {
nixd = { nixd = {
cmd = [ "${pkgs.nixd}/bin/nixd" ]; cmd = [ "${pkgs.nixd}/bin/nixd" ];
settings = { settings = {

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.optionalAttrs (lib.elem "nvim::lsp::php" config.machine.pkgs) { lib.optionalAttrs (lib.elem "nvim::lsp::php" config.machine.services) {
phpactor = { phpactor = {
cmd = [ cmd = [
"${pkgs.phpactor}/bin/phpactor" "${pkgs.phpactor}/bin/phpactor"

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.optionalAttrs (lib.elem "nvim::lsp::python" config.machine.pkgs) { lib.optionalAttrs (lib.elem "nvim::lsp::python" config.machine.services) {
pyright = { pyright = {
cmd = [ cmd = [
"${pkgs.pyright}/bin/pyright-langserver" "${pkgs.pyright}/bin/pyright-langserver"

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.optionalAttrs (lib.elem "nvim::lsp::rust" config.machine.pkgs) { lib.optionalAttrs (lib.elem "nvim::lsp::rust" config.machine.services) {
rust_analyzer = { rust_analyzer = {
cmd = [ cmd = [
"${pkgs.rustup}/bin/rustup" "${pkgs.rustup}/bin/rustup"

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.optionalAttrs (lib.elem "nvim::lsp::typescript" config.machine.pkgs) { lib.optionalAttrs (lib.elem "nvim::lsp::typescript" config.machine.services) {
ts_ls = { ts_ls = {
cmd = [ cmd = [
"${pkgs.nodePackages.typescript-language-server}/bin/typescript-language-server" "${pkgs.nodePackages.typescript-language-server}/bin/typescript-language-server"

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.optionalAttrs (lib.elem "nvim::lsp::yaml" config.machine.pkgs) { lib.optionalAttrs (lib.elem "nvim::lsp::yaml" config.machine.services) {
yamlls = { yamlls = {
cmd = [ cmd = [
"${pkgs.yaml-language-server}/bin/yaml-language-server" "${pkgs.yaml-language-server}/bin/yaml-language-server"

View file

@ -4,11 +4,11 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::lualine" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::lualine" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
dir = vPlug: vPlug.lualine-nvim; dir = vPlug: vPlug.lualine-nvim;
dependencies = (vPlug: with vPlug; [ nvim-web-devicons ]); dependencies = vPlug: [ vPlug.nvim-web-devicons ];
opts = { opts = {
options = { options = {
icons_enabled = true; icons_enabled = true;

View file

@ -4,7 +4,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::model" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::model" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
short = "gsuuon/model.nvim"; short = "gsuuon/model.nvim";

View file

@ -4,7 +4,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::noice" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::noice" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
dir = vPlug: vPlug.noice-nvim; dir = vPlug: vPlug.noice-nvim;

View file

@ -4,7 +4,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::nvim-highlight" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::nvim-highlight" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
lazy = true; lazy = true;

View file

@ -4,7 +4,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::oil-nvim" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::oil-nvim" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
lazy = false; lazy = false;

View file

@ -4,7 +4,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::otter" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::otter" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
lazy = true; lazy = true;

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::render-markdown" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::render-markdown" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
dir = vPlug: vPlug.render-markdown-nvim; dir = vPlug: vPlug.render-markdown-nvim;
@ -18,7 +18,7 @@ lib.mkIf (lib.elem "nvim::render-markdown" config.machine.pkgs) {
opts = { opts = {
completions = { completions = {
blink = { blink = {
enabled = (lib.elem "nvim::blink" config.machine.pkgs); enabled = (lib.elem "nvim::blink" config.machine.services);
}; };
}; };
latex = { latex = {

View file

@ -4,7 +4,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::sniprun" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::sniprun" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
lazy = true; lazy = true;

View file

@ -4,7 +4,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::table-mode" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::table-mode" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
lazy = true; lazy = true;

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::telescope" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::telescope" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
lazy = true; lazy = true;
@ -13,8 +13,6 @@ lib.mkIf (lib.elem "nvim::telescope" config.machine.pkgs) {
dependencies = ( dependencies = (
vPlug: with vPlug; [ vPlug: with vPlug; [
plenary-nvim plenary-nvim
"ghassan0/telescope-glyph.nvim"
"xiyaowong/telescope-emoji.nvim"
] ]
); );
keys = [ keys = [

View file

@ -4,7 +4,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::tmux-navigate" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::tmux-navigate" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
dir = vPlug: vPlug.vim-tmux-navigator; dir = vPlug: vPlug.vim-tmux-navigator;

View file

@ -5,7 +5,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::treesitter" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::treesitter" config.machine.services) {
programs.nvim-lazy.lazyPlugins = programs.nvim-lazy.lazyPlugins =
let let
treesitter = pkgs.vimPlugins.nvim-treesitter.withAllGrammars; treesitter = pkgs.vimPlugins.nvim-treesitter.withAllGrammars;

View file

@ -4,7 +4,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::trim" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::trim" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
lazy = true; lazy = true;

View file

@ -4,7 +4,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::undotree" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::undotree" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
lazy = true; lazy = true;

View file

@ -4,7 +4,7 @@
... ...
}: }:
lib.mkIf (lib.elem "nvim::which-key" config.machine.pkgs) { lib.mkIf (lib.elem "nvim::which-key" config.machine.services) {
programs.nvim-lazy.lazyPlugins = [ programs.nvim-lazy.lazyPlugins = [
{ {
dir = vPlug: vPlug.which-key-nvim; dir = vPlug: vPlug.which-key-nvim;