wrappers: move programs.nixvim declaration to _shared.nix

This commit is contained in:
Matt Sturgeon 2024-10-11 00:23:40 +01:00
parent af650ba940
commit e1c0b52487
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
4 changed files with 14 additions and 25 deletions

View file

@ -1,4 +1,6 @@
{
# Extra args for the `evalNixvim` call that produces the type for `programs.nixvim`
evalArgs ? { },
# Option path where extraFiles should go
filesOpt ? null,
# Filepath prefix to apply to extraFiles
@ -26,11 +28,17 @@ let
setAttrByPath
;
cfg = config.programs.nixvim;
nixvimConfiguration = config.lib.nixvim.modules.evalNixvim evalArgs;
extraFiles = lib.filter (file: file.enable) (lib.attrValues cfg.extraFiles);
in
{
_file = ./_shared.nix;
options.programs.nixvim = lib.mkOption {
inherit (nixvimConfiguration) type;
default = { };
};
# TODO: Added 2024-07-24; remove after 24.11
imports = [
(lib.mkRenamedOptionModule