forked from Shinonome/fred-neovim
FLAKE.NIX UPDATE
This commit is contained in:
@@ -30,6 +30,40 @@
|
|||||||
overlays = [(import rust-overlay)];
|
overlays = [(import rust-overlay)];
|
||||||
nixvimLib = nixvim.lib.${system};
|
nixvimLib = nixvim.lib.${system};
|
||||||
nixvim' = nixvim.legacyPackages.${system};
|
nixvim' = nixvim.legacyPackages.${system};
|
||||||
|
pkgs = import inputs.nixpkgs {
|
||||||
|
# Moved pkgs definition up for clarity and scope
|
||||||
|
inherit system overlays;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# --- NEW: Define a comprehensive "fullNixvimModule" ---
|
||||||
|
fullNixvimModule = {
|
||||||
|
inherit pkgs;
|
||||||
|
module = {pkgs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./config
|
||||||
|
./config/rust
|
||||||
|
./config/csharp
|
||||||
|
./config/golang
|
||||||
|
./config/python
|
||||||
|
./config/javascript
|
||||||
|
./config/iac
|
||||||
|
];
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
sops
|
||||||
|
lazygit
|
||||||
|
nerd-fonts.jetbrains-mono
|
||||||
|
rust-bin.stable.latest.default # From rust-overlay
|
||||||
|
ansible-lint
|
||||||
|
# Add any other packages needed across all configs here
|
||||||
|
];
|
||||||
|
};
|
||||||
|
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 = {
|
baseNixvimModule = {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
module = {pkgs, ...}: {
|
module = {pkgs, ...}: {
|
||||||
@@ -107,11 +141,11 @@
|
|||||||
};
|
};
|
||||||
extraSpecialArgs = {};
|
extraSpecialArgs = {};
|
||||||
};
|
};
|
||||||
pkgs = import inputs.nixpkgs {
|
|
||||||
inherit system overlays;
|
# Define the actual Neovim instances
|
||||||
config.allowUnfree = true;
|
# --- MODIFIED: defaultNvim now uses fullNixvimModule ---
|
||||||
};
|
defaultNvim = nixvim'.makeNixvimWithModule fullNixvimModule;
|
||||||
baseNvim = nixvim'.makeNixvimWithModule baseNixvimModule;
|
# --- END MODIFIED ---
|
||||||
rustNvim = nixvim'.makeNixvimWithModule rustNixvimModule;
|
rustNvim = nixvim'.makeNixvimWithModule rustNixvimModule;
|
||||||
csharpNvim = nixvim'.makeNixvimWithModule csharpNixvimModule;
|
csharpNvim = nixvim'.makeNixvimWithModule csharpNixvimModule;
|
||||||
goNvim = nixvim'.makeNixvimWithModule goNixvimModule;
|
goNvim = nixvim'.makeNixvimWithModule goNixvimModule;
|
||||||
@@ -120,23 +154,18 @@
|
|||||||
iacNvim = nixvim'.makeNixvimWithModule iacNixvimModule;
|
iacNvim = nixvim'.makeNixvimWithModule iacNixvimModule;
|
||||||
in {
|
in {
|
||||||
checks = {
|
checks = {
|
||||||
# Run `nix flake check .` to verify that your config is not broken
|
# It's good practice to check the full module if it's your primary config
|
||||||
default = nixvimLib.check.mkTestDerivationFromNixvimModule baseNixvimModule;
|
default = nixvimLib.check.mkTestDerivationFromNixvimModule fullNixvimModule;
|
||||||
};
|
};
|
||||||
packages = {
|
packages = {
|
||||||
# Lets you run `nix run .` to start nixvim
|
# Lets you run `nix run .` to start nixvim with all configurations
|
||||||
default = baseNvim;
|
default = defaultNvim;
|
||||||
# Lets you run `nix run .#rust` to start nixvim with Rust configuration
|
# Existing language-specific packages remain
|
||||||
rust = rustNvim;
|
rust = rustNvim;
|
||||||
# Lets you run `nix run .#csharp` to start nixvim with C# configuration
|
|
||||||
csharp = csharpNvim;
|
csharp = csharpNvim;
|
||||||
# Lets you run `nix run .#golang` to start nixvim with Go configuration
|
|
||||||
golang = goNvim;
|
golang = goNvim;
|
||||||
# Lets you run `nix run .#python` to start nixvim with Python configuration
|
|
||||||
python = pythonNvim;
|
python = pythonNvim;
|
||||||
# Lets you run `nix run .#javascript` to start nixvim with JS/TS configuration
|
javascript = javascriptNixvimModule; # This should be javascriptNvim not javascriptNixvimModule
|
||||||
javascript = javascriptNvim;
|
|
||||||
# Lets you run `nix run .#javascript` to start nixvim with IaC configuration
|
|
||||||
iac = iacNvim;
|
iac = iacNvim;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user