editors: mode to individual module.nix
This commit is contained in:
parent
d6d66bc43a
commit
7ac03d8d77
2 changed files with 0 additions and 8 deletions
30
modules/programs/editors/nvf/module.nix
Normal file
30
modules/programs/editors/nvf/module.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) filter map toString elem;
|
||||
inherit (lib.filesystem) listFilesRecursive;
|
||||
inherit (lib.strings) hasSuffix;
|
||||
inherit (lib.lists) concatLists;
|
||||
|
||||
mkNeovimModule = {
|
||||
path,
|
||||
ignoredPaths ? [],
|
||||
}:
|
||||
filter (hasSuffix ".nix") (
|
||||
map toString (
|
||||
filter (path: path != ./default.nix && !elem path ignoredPaths) (listFilesRecursive path)
|
||||
)
|
||||
);
|
||||
|
||||
nvf = inputs.neovim-flake;
|
||||
in {
|
||||
imports = concatLists [
|
||||
# neovim-flake home-manager module
|
||||
[nvf.nixosModules.default]
|
||||
# construct this entire directory as a module
|
||||
# which means all default.nix files will be imported automtically
|
||||
(mkNeovimModule {path = ./.;})
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue