Allow using global config with hm and nixos (#48)

* remove useless nixvim file

* reorganize flake outputs

* use global config file with home-manager and nixos
This commit is contained in:
Luc Chabassier 2022-10-17 15:08:17 +02:00 committed by GitHub
parent 931db3e83f
commit f2a103da30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 146 additions and 355 deletions

View file

@ -65,9 +65,21 @@ in
description = "Extra contents for init.vim";
};
output = mkOption {
wrapRc = mkOption {
type = types.bool;
description = "Should the config be included in the wrapper script";
default = false;
};
finalPackage = mkOption {
type = types.package;
description = "Final package built by nixvim";
description = "Wrapped neovim";
readOnly = true;
};
initContent = mkOption {
type = types.str;
description = "The content of the init.vim file";
readOnly = true;
visible = false;
};
@ -113,9 +125,10 @@ in
wrappedNeovim = pkgs.wrapNeovimUnstable config.package (neovimConfig // {
wrapperArgs = lib.escapeShellArgs neovimConfig.wrapperArgs + " " + extraWrapperArgs;
inherit (config) wrapRc;
});
in
{
output = wrappedNeovim;
in {
finalPackage = wrappedNeovim;
initContent = neovimConfig.neovimRcContent;
};
}