forked from Shinonome/fred-neovim
added baseNvim, and use it as default
This commit is contained in:
@@ -31,12 +31,18 @@
|
||||
nixvimLib = nixvim.lib.${system};
|
||||
nixvim' = nixvim.legacyPackages.${system};
|
||||
pkgs = import inputs.nixpkgs {
|
||||
# Moved pkgs definition up for clarity and scope
|
||||
inherit system overlays;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
deps = with pkgs; [
|
||||
sops
|
||||
lazygit
|
||||
nerd-fonts.jetbrains-mono
|
||||
rust-bin.stable.latest.default # From rust-overlay
|
||||
ansible-lint
|
||||
beautysh
|
||||
];
|
||||
|
||||
# --- NEW: Define a comprehensive "fullNixvimModule" ---
|
||||
fullNixvimModule = {
|
||||
inherit pkgs;
|
||||
module = {pkgs, ...}: {
|
||||
@@ -49,27 +55,15 @@
|
||||
./config/javascript
|
||||
./config/iac
|
||||
];
|
||||
extraPackages = with pkgs; [
|
||||
sops
|
||||
lazygit
|
||||
nerd-fonts.jetbrains-mono
|
||||
rust-bin.stable.latest.default # From rust-overlay
|
||||
ansible-lint
|
||||
beautysh
|
||||
# Add any other packages needed across all configs here
|
||||
];
|
||||
extraPackages = deps;
|
||||
};
|
||||
extraSpecialArgs = specialArgs; # Keep specialArgs for self-reference
|
||||
};
|
||||
# --- END NEW ---
|
||||
|
||||
# You can keep these individual modules for specific language dev shells if you still want them
|
||||
# They are not used by the default package anymore, but useful for testing/isolated environments
|
||||
baseNixvimModule = {
|
||||
inherit pkgs;
|
||||
module = {pkgs, ...}: {
|
||||
imports = [./config];
|
||||
extraPackages = with pkgs; [sops lazygit nerd-fonts.jetbrains-mono];
|
||||
extraPackages = deps;
|
||||
};
|
||||
extraSpecialArgs = specialArgs;
|
||||
};
|
||||
@@ -143,10 +137,8 @@
|
||||
extraSpecialArgs = {};
|
||||
};
|
||||
|
||||
# Define the actual Neovim instances
|
||||
# --- MODIFIED: defaultNvim now uses fullNixvimModule ---
|
||||
defaultNvim = nixvim'.makeNixvimWithModule fullNixvimModule;
|
||||
# --- END MODIFIED ---
|
||||
fullNvim = nixvim'.makeNixvimWithModule fullNixvimModule;
|
||||
baseNvim = nixvim'.makeNixvimWithModule baseNixvimModule;
|
||||
rustNvim = nixvim'.makeNixvimWithModule rustNixvimModule;
|
||||
csharpNvim = nixvim'.makeNixvimWithModule csharpNixvimModule;
|
||||
goNvim = nixvim'.makeNixvimWithModule goNixvimModule;
|
||||
@@ -155,18 +147,16 @@
|
||||
iacNvim = nixvim'.makeNixvimWithModule iacNixvimModule;
|
||||
in {
|
||||
checks = {
|
||||
# It's good practice to check the full module if it's your primary config
|
||||
default = nixvimLib.check.mkTestDerivationFromNixvimModule fullNixvimModule;
|
||||
default = nixvimLib.check.mkTestDerivationFromNixvimModule baseNixvimModule;
|
||||
};
|
||||
packages = {
|
||||
# Lets you run `nix run .` to start nixvim with all configurations
|
||||
default = defaultNvim;
|
||||
# Existing language-specific packages remain
|
||||
default = baseNvim;
|
||||
fullNvim = fullNvim;
|
||||
rust = rustNvim;
|
||||
csharp = csharpNvim;
|
||||
golang = goNvim;
|
||||
python = pythonNvim;
|
||||
javascript = javascriptNixvimModule; # This should be javascriptNvim not javascriptNixvimModule
|
||||
javascript = javascriptNvim; # This should be javascriptNvim not javascriptNixvimModule
|
||||
iac = iacNvim;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user