-
-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use without HM or nixos #16
Comments
Hey, thanks for the pointers! This is actually something I've wanted to do for a while, but never quite figured out/had the patience to look into. It's definitely doable, so I'll look into what you suggested! |
Hi! My flake does indeed use a separate module system for config (so no buildNeovim = { pkgs ? dpkgs, configuration }:
let
eval = evalModules {
modules = getNixFiles ./modules ++ [
(rec {
_file = ./flake.nix;
key = _file;
config = {
_module.args.pkgs = mkForce pkgs;
_module.args.vimLib = import ./lib { lib = pkgs.lib; };
};
})
configuration
];
};
in eval.config.product.binary; Here To actually use the resulting binary you have to add something like Not really sure if this style is something you want but feel free to ask me any questions! |
I've been working on this on the standalone branch, if you want to check it out! As far as I can tell, the only thing left to support on this branch are the home-manager and NixOS modules. However, if you use it, you can generate a package derivation like this: {
outputs = { self, nixvim, ... }: {
nvim-with-gruvbox = nixvim.build "x86_64-linux" {
colorschemes.gruvbox.enable = true;
};
};
} If you have any questions please ask! |
I would like to use nixvim in a prototype runnable flake "env" project https://github.com/aquiferma/noter (see discussion 1). For this, I need a
myNeoVim
package with config/customizations baked in.There is a broader design need at the ecosystem level to define an ergonomic relationship between flakes and the module system outside the context of HM/nixos, but nixvim seems an OK place to pick up the conversation.
It seems like a "quick fix" might be to inline or maybe wrap one of the
programs.neovim
modules 23.Also probably worth a look, @syberant's nix-neovim flake 4, which IIUC inlines its own module system for config, and only calls
pkgs.wrappedNeoVim
.Footnotes
https://github.com/aquiferma/noter/issues/2 ↩
https://github.com/nix-community/home-manager/blob/master/modules/programs/neovim.nix ↩
https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/programs/neovim.nix ↩
https://github.com/syberant/nix-neovim/blob/main/flake.nix ↩
The text was updated successfully, but these errors were encountered: