mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
23 lines
424 B
Nix
23 lines
424 B
Nix
|
{
|
||
|
name,
|
||
|
config,
|
||
|
lib,
|
||
|
pkgs,
|
||
|
...
|
||
|
}:
|
||
|
{
|
||
|
options = {
|
||
|
plugin = lib.mkOption {
|
||
|
type = lib.types.package;
|
||
|
description = "A derivation with the content of the file in it";
|
||
|
readOnly = true;
|
||
|
internal = true;
|
||
|
};
|
||
|
};
|
||
|
config = {
|
||
|
path = name;
|
||
|
type = lib.mkDefault (if lib.hasSuffix ".vim" name then "vim" else "lua");
|
||
|
plugin = pkgs.writeTextDir config.path config.content;
|
||
|
};
|
||
|
}
|