nvf finally working well!

This commit is contained in:
Charlie Root 2024-07-07 23:45:18 +02:00
commit fea17cb5c1
24 changed files with 209 additions and 189 deletions

View file

@ -1,4 +1,8 @@
{pkgs, ...}: { {
pkgs,
config,
...
}: {
# allow unfree packages # allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
# Time Zone # Time Zone
@ -12,6 +16,7 @@
trusted-public-keys = [ trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
]; ];
trusted-users = ["root" "${config.modules.other.system.username}"];
# enable flakes # enable flakes
experimental-features = ["nix-command" "flakes"]; experimental-features = ["nix-command" "flakes"];
# reduce file size used & automatic garbage collector # reduce file size used & automatic garbage collector
@ -81,7 +86,7 @@
}; };
helix.enable = true; helix.enable = true;
kakoune.enable = true; kakoune.enable = true;
nixvim.enable = false; # broken at the moment # nixvim.enable = false; # broken at the moment
neovim.enable = true; neovim.enable = true;
}; };
services = { services = {

View file

@ -14,6 +14,7 @@ in {
bluetuith bluetuith
bluez bluez
bun bun
cachix
cmake cmake
difftastic difftastic
dig dig
@ -45,7 +46,6 @@ in {
gnome.nautilus gnome.nautilus
ncmpcpp ncmpcpp
neofetch neofetch
neovim
networkmanagerapplet networkmanagerapplet
nextcloud-client nextcloud-client
nicotine-plus nicotine-plus

View file

@ -1 +1 @@
_: {imports = [./emacs.nix ./helix.nix ./kakoune.nix ./nixvim/nixvim.nix ./nvf];} _: {imports = [./emacs.nix ./helix.nix ./kakoune.nix ./nvf];}

View file

@ -1,4 +1,5 @@
{ {
pkgs,
config, config,
lib, lib,
inputs, inputs,
@ -11,20 +12,44 @@
mkNeovimModule = { mkNeovimModule = {
path, path,
ingoredPaths ? [./nvf.nix ./plugins/sources/default.nix], ignoredPaths ? [./nvf.nix ./plugins/sources/default.nix ./plugins],
}: }:
filter (hasSuffix ".nix") ( filter (hasSuffix ".nix") (
map toString ( map toString (
filter (path: path != ./default.nix && !elem path ingoredPaths) (listFilesRecursive path) filter (path: path != ./default.nix && !elem path ignoredPaths) (listFilesRecursive path)
) )
); );
nvf = inputs.neovim-flake; nvf = inputs.neovim-flake;
in { in {
imports = concatLists [ environment.systemPackages = with pkgs; [
typstyle
];
imports = concatLists [
# neovim-flake home-manager module # neovim-flake home-manager module
[nvf.nixosModules.default] [nvf.nixosModules.default]
# [./plugins/settings/ui.nix]
# [./plugins/settings/filetree.nix]
# [
# ./plugins/settings/autocomplete.nix
# ./plugins/settings/visuals.nix
# ./plugins/settings/autopairs.nix
# ./plugins/settings/binds.nix
# ./plugins/settings/comments.nix
# ./plugins/settings/dashboard.nix
# ./plugins/settings/debugger.nix
# ./plugins/settings/languages.nix
# ./plugins/settings/lsp.nix
# ./plugins/settings/telescope.nix
# ./plugins/settings/notes.nix
# ./plugins/settings/notify.nix
# ./plugins/settings/projects.nix
# ./plugins/settings/statusline.nix
# ./plugins/settings/tabline.nix
# ./plugins/settings/theme.nix
# ./plugins/settings/treesitter.nix
# ./plugins/settings/utility.nix
# ./plugins/settings/git.nix
# construct this entore directory as a module # construct this entore directory as a module
# which means all default.nix files will be imported automtically # which means all default.nix files will be imported automtically
(mkNeovimModule {path = ./.;}) (mkNeovimModule {path = ./.;})

View file

@ -1,13 +1,14 @@
{ {
programs.neovim-flake.settings.vim.maps = { programs.neovim-flake.settings.vim.maps = {
normal = { normal = {
/*
# General # General
"<leader>fd".action = ":lua vim.g.formatsave = not vim.g.formatsave<CR>"; "<leader>fd".action = ":lua vim.g.formatsave = not vim.g.formatsave<CR>";
"<leader>zt".action = ":<C-U>let g:default_terminal = v:count1<CR>"; "<leader>zt".action = ":<C-U>let g:default_terminal = v:count1<CR>";
"<leader>e".action = ":NvimTreeToggle<CR>"; #"<leader>e".action = ":NvimTreeToggle<CR>";
"<leader>ld".action = ":lua vim.diagnostic.setqflist({open = true})<CR>"; # "<leader>ld".action = ":lua vim.diagnostic.setqflist({open = true})<CR>";
"<leader>lf".action = ":lua vim.lsp.buf.format()<CR>"; # "<leader>lf".action = ":lua vim.lsp.buf.format()<CR>";
"<leader>li".action = ":lua vim.lsp.buf.implementation()<CR>"; # "<leader>li".action = ":lua vim.lsp.buf.implementation()<CR>";
"<leader>;".action = "A;<esc>"; # Append # "<leader>;".action = "A;<esc>"; # Append #
# Diffview # Diffview
@ -44,9 +45,11 @@
# vsnip # vsnip
#"<C-jn>".action = "<Plug>(vsnip-jump-next)"; #"<C-jn>".action = "<Plug>(vsnip-jump-next)";
#"<C-jp>".action = "<Plug>(vsnip-jump-prev)"; #"<C-jp>".action = "<Plug>(vsnip-jump-prev)";
*/
}; };
normalVisualOp = { normalVisualOp = {
/*
"<leader>gs".action = ":Gitsigns stage_hunk<CR>"; "<leader>gs".action = ":Gitsigns stage_hunk<CR>";
"<leader>gr".action = ":Gitsigns reset_hunk<CR>"; "<leader>gr".action = ":Gitsigns reset_hunk<CR>";
"<leader>lr".action = "<cmd>lua vim.lsp.buf.references()<CR>"; "<leader>lr".action = "<cmd>lua vim.lsp.buf.references()<CR>";
@ -60,6 +63,7 @@
action = "':ToggleTermSendVisualLines ' . v:count == 0 ? g:default_terminal : v:count"; action = "':ToggleTermSendVisualLines ' . v:count == 0 ? g:default_terminal : v:count";
expr = true; expr = true;
}; };
*/
}; };
}; };
} }

View file

@ -4,12 +4,11 @@
... ...
}: let }: let
inherit (config.modules.other.system) username; inherit (config.modules.other.system) username;
inherit (pkgs.vimPlugins) friendly-snippets aerial-nvim nvim-surround undotree mkdir-nvim ssr-nvim direnv-vim legendary-nvim; inherit (pkgs.vimPlugins) friendly-snippets aerial-nvim nvim-surround undotree mkdir-nvim ssr-nvim direnv-vim legendary-nvim lazygit-nvim;
inherit (pkgs) fetchFromGitHub; inherit (pkgs) fetchFromGitHub;
inherit (pkgs.vimUtils) buildVimPlugin; inherit (pkgs.vimUtils) buildVimPlugin;
pluginSources = { pluginSources = {
smart-splits = buildVimPlugin { smart-splits = buildVimPlugin {
name = "smart-splits"; name = "smart-splits";
src = fetchFromGitHub { src = fetchFromGitHub {
@ -17,128 +16,127 @@
repo = "smart-splits.nvim"; repo = "smart-splits.nvim";
rev = "95833675cd92538bf9cded1d2d58d1fc271c5428"; rev = "95833675cd92538bf9cded1d2d58d1fc271c5428";
hash = "sha256-TsEzHalLTLp9USV0aGRadAObViC/OpIJeuEJ95lJUL8="; hash = "sha256-TsEzHalLTLp9USV0aGRadAObViC/OpIJeuEJ95lJUL8=";
};
}; };
};
regexplainer = buildVimPlugin { regexplainer = buildVimPlugin {
name = "nvim-regexplainer"; name = "nvim-regexplainer";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "bennypowers"; owner = "bennypowers";
repo = "nvim-regexplainer"; repo = "nvim-regexplainer";
rev = "4250c8f3c1307876384e70eeedde5149249e154f"; rev = "4250c8f3c1307876384e70eeedde5149249e154f";
hash = "sha256-15DLbKtOgUPq4DcF71jFYu31faDn52k3P1x47GL3+b0="; hash = "sha256-15DLbKtOgUPq4DcF71jFYu31faDn52k3P1x47GL3+b0=";
};
}; };
};
specs-nvim = buildVimPlugin { specs-nvim = buildVimPlugin {
name = "specs.nvim"; name = "specs.nvim";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "notashelf"; owner = "notashelf";
repo = "specs.nvim"; repo = "specs.nvim";
rev = "0792aaebf8cbac0c8545c43ad648b98deb83af42"; rev = "0792aaebf8cbac0c8545c43ad648b98deb83af42";
hash = "sha256-doHE/3bRuC8lyYxMk927JmwLfiy7aR22+i+BNefEGJ4="; hash = "sha256-doHE/3bRuC8lyYxMk927JmwLfiy7aR22+i+BNefEGJ4=";
};
}; };
};
deferred-clipboard = buildVimPlugin { deferred-clipboard = buildVimPlugin {
name = "deferred-clipboard"; name = "deferred-clipboard";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "EtiamNullam"; owner = "EtiamNullam";
repo = "deferred-clipboard.nvim"; repo = "deferred-clipboard.nvim";
rev = "810a29d166eaa41afc220cc7cd85eeaa3c43b37f"; rev = "810a29d166eaa41afc220cc7cd85eeaa3c43b37f";
hash = "sha256-nanNQEtpjv0YKEkkrPmq/5FPxq+Yj/19cs0Gf7YgKjU="; hash = "sha256-nanNQEtpjv0YKEkkrPmq/5FPxq+Yj/19cs0Gf7YgKjU=";
};
}; };
/* };
data-viewer-nvim = buildVimPlugin { /*
name = "data-viewer.nvim"; data-viewer-nvim = buildVimPlugin {
src = fetchFromGitHub { name = "data-viewer.nvim";
owner = "VidocqH"; src = fetchFromGitHub {
repo = "data-viewer.nvim"; owner = "VidocqH";
rev = "40ddf37bb7ab6c04ff9e820812d1539afe691668"; repo = "data-viewer.nvim";
hash = "sha256-D5hvLhsYski11H9qiDDL2zlZMtYmbpHgpewiWR6C7rE="; rev = "40ddf37bb7ab6c04ff9e820812d1539afe691668";
}; hash = "sha256-D5hvLhsYski11H9qiDDL2zlZMtYmbpHgpewiWR6C7rE=";
}; };
*/ };
vim-nftables = buildVimPlugin { */
name = "vim-nftables"; vim-nftables = buildVimPlugin {
src = fetchFromGitHub { name = "vim-nftables";
owner = "awisse"; src = fetchFromGitHub {
repo = "vim-nftables"; owner = "awisse";
rev = "bc29309080b4c7e1888ffb1a830846be16e5b8e7"; repo = "vim-nftables";
hash = "sha256-L1x3Hv95t/DBBrLtPBKrqaTbIPor/NhVuEHVIYo/OaA="; rev = "bc29309080b4c7e1888ffb1a830846be16e5b8e7";
}; hash = "sha256-L1x3Hv95t/DBBrLtPBKrqaTbIPor/NhVuEHVIYo/OaA=";
}; };
};
neotab-nvim = buildVimPlugin { neotab-nvim = buildVimPlugin {
name = "neotab.nvim"; name = "neotab.nvim";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "kawre"; owner = "kawre";
repo = "neotab.nvim"; repo = "neotab.nvim";
rev = "6c6107dddaa051504e433608f59eca606138269b"; rev = "6c6107dddaa051504e433608f59eca606138269b";
hash = "sha256-bSFKbjj8fJHdfBzYoQ9l3NU0GAYfdfCbESKbwdbLNSw="; hash = "sha256-bSFKbjj8fJHdfBzYoQ9l3NU0GAYfdfCbESKbwdbLNSw=";
};
}; };
};
}; };
in { in {
programs.neovim-flake.settings.vim.extraPlugins = { programs.neovim-flake.settings.vim.extraPlugins = {
# plugins that are pulled from nixpkgs # plugins that are pulled from nixpkgs
direnv = {package = direnv-vim;}; /*
friendly-snippets = {package = friendly-snippets;}; direnv = {package = direnv-vim;};
mkdir-nvim = {package = mkdir-nvim;}; friendly-snippets = {package = friendly-snippets;};
aerial = { mkdir-nvim = {package = mkdir-nvim;};
package = aerial-nvim; lazygit-nvim = {package = lazygit-nvim;};
setup = "require('aerial').setup {}"; aerial = {
}; package = aerial-nvim;
setup = "require('aerial').setup {}";
};
nvim-surround = { nvim-surround = {
package = nvim-surround; package = nvim-surround;
setup = "require('nvim-surround').setup {}"; setup = "require('nvim-surround').setup {}";
}; };
undotree = { undotree = {
package = undotree; package = undotree;
setup = '' setup = ''
vim.g.undotree_ShortIndicators = true vim.g.undotree_ShortIndicators = true
vim.g.undotree_TreeVertShape = '' vim.g.undotree_TreeVertShape = ''
''; '';
}; };
ssr-nvim = { ssr-nvim = {
package = ssr-nvim; package = ssr-nvim;
setup = "require('ssr').setup {}"; setup = "require('ssr').setup {}";
}; };
legendary = { legendary = {
package = legendary-nvim; package = legendary-nvim;
setup = '' setup = ''
require('legendary').setup {}; require('legendary').setup {};
''; '';
}; };
# plugins that are built from their sources # plugins that are built from their sources
regexplainer = {package = pluginSources.regexplainer;}; regexplainer = {package = pluginSources.regexplainer;};
vim-nftables = {package = pluginSources.vim-nftables;}; vim-nftables = {package = pluginSources.vim-nftables;};
/* /*
data-view = { data-view = {
package = pluginSources.data-viewer-nvim; package = pluginSources.data-viewer-nvim;
setup = '' setup = ''
-- open data files in data-viewer.nvim -- open data files in data-viewer.nvim
vim.api.nvim_exec([[ vim.api.nvim_exec([[
autocmd BufReadPost,BufNewFile *.sqlite,*.csv,*.tsv DataViewer autocmd BufReadPost,BufNewFile *.sqlite,*.csv,*.tsv DataViewer
]], false) ]], false)
-- keybinds -- keybinds
vim.api.nvim_set_keymap('n', '<leader>dv', ':DataViewer<CR>', {noremap = true}) vim.api.nvim_set_keymap('n', '<leader>dv', ':DataViewer<CR>', {noremap = true})
vim.api.nvim_set_keymap('n', '<leader>dvn', ':DataViewerNextTable<CR>', {noremap = true}) vim.api.nvim_set_keymap('n', '<leader>dvn', ':DataViewerNextTable<CR>', {noremap = true})
vim.api.nvim_set_keymap('n', '<leader>dvp', ':DataViewerPrevTable<CR>', {noremap = true}) vim.api.nvim_set_keymap('n', '<leader>dvp', ':DataViewerPrevTable<CR>', {noremap = true})
vim.api.nvim_set_keymap('n', '<leader>dvc', ':DataViewerClose<CR>', {noremap = true}) vim.api.nvim_set_keymap('n', '<leader>dvc', ':DataViewerClose<CR>', {noremap = true})
''; '';
}; };
*/
smart-splits = { smart-splits = {
package = pluginSources.smart-splits; package = pluginSources.smart-splits;
setup = "require('smart-splits').setup {}"; setup = "require('smart-splits').setup {}";
@ -204,5 +202,6 @@ in {
vim.api.nvim_set_keymap('n', 'N', 'N:lua require("specs").show_specs()<CR>', { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', 'N', 'N:lua require("specs").show_specs()<CR>', { noremap = true, silent = true })
''; '';
}; };
*/
}; };
} }

View file

@ -1,8 +1,8 @@
_:{ _:{
programs.neovim-flake.settings.vim = { programs.neovim-flake.settings.vim = {
assistant.copilot = { assistant.copilot = {
enable = true; enable = false;
cmp.enable = true; cmp.enable = false;
}; };
}; };
} }

View file

@ -5,7 +5,7 @@ _:{
type = "nvim-cmp"; type = "nvim-cmp";
mappings = { mappings = {
# close = "<C-e>"; # close = "<C-e>";
confirm = "<C-y>"; # confirm = "<tab>";
next = "<C-n>"; next = "<C-n>";
previous = "<C-p>"; previous = "<C-p>";
scrollDocsDown = "<C-j>"; scrollDocsDown = "<C-j>";

View file

@ -1,6 +1,4 @@
{config, ...}: let _: {
inherit (config.modules.other.system) username;
in {
programs.neovim-flake.settings.vim = { programs.neovim-flake.settings.vim = {
autopairs.enable = true; autopairs.enable = true;
}; };

View file

@ -3,7 +3,7 @@
in { in {
programs.neovim-flake.settings.vim = { programs.neovim-flake.settings.vim = {
dashboard = { dashboard = {
alpha.enable = true; alpha.enable = false;
}; };
}; };
} }

View file

@ -1,6 +1,4 @@
{config, ...}: let _: {
inherit (config.modules.other.system) username;
in {
programs.neovim-flake.settings.vim = { programs.neovim-flake.settings.vim = {
filetree = { filetree = {
nvimTree = { nvimTree = {
@ -9,6 +7,7 @@ in {
mappings = { mappings = {
#toggle = "<C-w>"; #toggle = "<C-w>";
toggle = "<leader>e";
}; };
setupOpts = { setupOpts = {

View file

@ -1,4 +1,4 @@
_:{ _: {
programs.neovim-flake.settings.vim = { programs.neovim-flake.settings.vim = {
git = { git = {
enable = true; enable = true;

View file

@ -1,4 +1,4 @@
_:{ _: {
programs.neovim-flake.settings.vim = { programs.neovim-flake.settings.vim = {
languages = { languages = {
enableLSP = true; enableLSP = true;

View file

@ -1,4 +1,4 @@
_:{ _: {
programs.neovim-flake.settings.vim = { programs.neovim-flake.settings.vim = {
lsp = { lsp = {
formatOnSave = true; formatOnSave = true;
@ -8,8 +8,8 @@ _:{
lspsaga.enable = false; lspsaga.enable = false;
lspSignature.enable = true; lspSignature.enable = true;
nvimCodeActionMenu.enable = true; nvimCodeActionMenu.enable = true;
trouble.enable = false; # trouble.enable = false;
nvim-docs-view.enable = true; # nvim-docs-view.enable = true;
}; };
}; };
} }

View file

@ -3,7 +3,7 @@
in { in {
programs.neovim-flake.settings.vim = { programs.neovim-flake.settings.vim = {
notify = { notify = {
nvim-notify.enable = true; nvim-notify.enable = true;
}; };
}; };
} }

View file

@ -1,6 +1,4 @@
{config, ...}: let _: {
inherit (config.modules.other.system) username;
in {
programs.neovim-flake.settings.vim = { programs.neovim-flake.settings.vim = {
statusline = { statusline = {
lualine = { lualine = {

View file

@ -1,6 +1,4 @@
{config, ...}: let _: {
inherit (config.modules.other.system) username;
in {
programs.neovim-flake.settings.vim = { programs.neovim-flake.settings.vim = {
tabline = { tabline = {
nvimBufferline.enable = true; nvimBufferline.enable = true;

View file

@ -1,8 +1,8 @@
_:{ _: {
programs.neovim-flake.settings.vim = { programs.neovim-flake.settings.vim = {
terminal = { terminal = {
toggleterm = { toggleterm = {
enable = true; enable = false;
mappings.open = "<C-t>"; mappings.open = "<C-t>";
setupOpts = { setupOpts = {
@ -10,7 +10,6 @@ _:{
lazygit = { lazygit = {
enable = true; enable = true;
direction = "tab"; direction = "tab";
mappings.open = "<leader>gg";
}; };
}; };
}; };

View file

@ -9,7 +9,7 @@ in {
ui = { ui = {
noice.enable = true; noice.enable = true;
colorizer.enable = true; colorizer.enable = true;
modes-nvim.enable = false; modes-nvim.enable = true;
illuminate.enable = true; illuminate.enable = true;
breadcrumbs = { breadcrumbs = {

View file

@ -1,30 +1,24 @@
{ {pkgs, ...}: {
config,
pkgs,
...
}: let
inherit (config.modules.other.system) username;
in {
programs.neovim-flake.settings.vim = { programs.neovim-flake.settings.vim = {
utility = { utility = {
ccc.enable = true; ccc.enable = true;
icon-picker.enable = true; icon-picker.enable = true;
diffview-nvim.enable = true; diffview-nvim.enable = true;
#
vim-wakatime = { vim-wakatime = {
enable = true; enable = true;
cli-package = pkgs.wakatime-cli; cli-package = pkgs.wakatime-cli;
}; };
#
motion = { # motion = {
hop.enable = true; # hop.enable = false;
leap.enable = false; # leap.enable = false;
}; # };
#
preview = { # preview = {
glow.enable = true; # glow.enable = true;
markdownPreview.enable = true; # markdownPreview.enable = true;
}; # };
}; };
}; };
} }

View file

@ -5,7 +5,7 @@ in {
visuals = { visuals = {
enable = true; enable = true;
nvimWebDevicons.enable = true; nvimWebDevicons.enable = true;
scrollBar.enable = true; scrollBar.enable = false;
smoothScroll.enable = false; smoothScroll.enable = false;
cellularAutomaton.enable = false; cellularAutomaton.enable = false;
highlight-undo.enable = true; highlight-undo.enable = true;

View file

@ -38,7 +38,7 @@ in {
# alternatively, neovim-nightly from the neovim-nightly overlay # alternatively, neovim-nightly from the neovim-nightly overlay
# via inputs.neovim-nightly.packages.${pkgs.stdenv.system}.neovim # via inputs.neovim-nightly.packages.${pkgs.stdenv.system}.neovim
package = pkgs.neovim-unwrapped; package = pkgs.neovim-unwrapped;
/*
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;
@ -51,49 +51,50 @@ in {
spellcheck = { spellcheck = {
enable = true; enable = true;
# TODO add de # TODO add de
languages = ["en"]; languages = ["en" "de"];
}; };
enableLuaLoader = true; enableLuaLoader = true;
enableEditorconfig = true; enableEditorconfig = true;
debugMode = { debugMode = {
enable = false; enable = false;
logFile = "/tmp/nvim.log"; logFile = "/tmp/nvim.log";
}; };
additionalRuntimePaths = [ additionalRuntimePaths = [
(mkRuntimeDir "after") (mkRuntimeDir "after")
(mkRuntimeDir "spell") (mkRuntimeDir "spell")
]; ];
# while I should be doing this in luaConfigRC below # while I should be doing this in luaConfigRC below
# I have come to realise that spellfile contents are # I have come to realise that spellfile contents are
# actually **not** loaded when luaConfigRC is used. # actually **not** loaded when luaConfigRC is used.
# as spellfile is a vim thing, this should be fine # as spellfile is a vim thing, this should be fine
configRC.spellfile = entryAnywhere '' # configRC.spellfile = entryAnywhere ''
set spellfile=${toString ./spell/runtime/en.utf-8.add} " toString sanitizes the path # set spellfile=${toString ./spell/runtime/en.utf-8.add} " toString sanitizes the path
''; # '';
# additional lua configuration that I can append # additional lua configuration that I can append
# or, to be more precise, randomly inject into # or, to be more precise, randomly inject into
# the lua configuration of my Neovim configuration # the lua configuration of my Neovim configuration
# wrapper. this is recursively read from the lua # wrapper. this is recursively read from the lua
# directory, so we do not need to use require # directory, so we do not need to use require
luaConfigRC = let luaConfigRC = let
# get the name of each lua file in the lua directory, where setting files reside # get the name of each lua file in the lua directory, where setting files reside
# and import them recursively # and import them recursively
configPaths = filter (hasSuffix ".lua") (map toString (listFilesRecursive ./lua)); configPaths = filter (hasSuffix ".lua") (map toString (listFilesRecursive ./lua));
# generates a key-value pair that looks roughly as follows: # generates a key-value pair that looks roughly as follows:
# `<filePath> = entryAnywhere ''<contents of filePath>''` # `<filePath> = entryAnywhere ''<contents of filePath>''`
# which is expected by neovim-flake's modified DAG library # which is expected by neovim-flake's modified DAG library
luaConfig = genAttrs configPaths (file: luaConfig = genAttrs configPaths (file:
entryBefore ["luaScript"] '' entryBefore ["luaScript"] ''
${fileContents "${file}"} ${fileContents "${file}"}
''); '');
in in
luaConfig; luaConfig;
*/
}; };
}; };
}; };

View file

@ -1,3 +1,3 @@
_: { _: {
imports = [./btop.nix ./neovim.nix ./newsboat.nix ./ncmpcpp.nix ./yazi.nix]; imports = [./btop.nix ./newsboat.nix ./ncmpcpp.nix ./yazi.nix];
} }