options is a taken var name

This commit is contained in:
2025-01-16 14:40:22 -06:00
parent 1f6f0e87a0
commit a3b02c4d06
2 changed files with 8 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
{ pkgs, options, ... }: { { pkgs, opts, ... }: {
# Import all your configuration modules here # Import all your configuration modules here
imports = [ ./bufferline.nix ]; imports = [ ./bufferline.nix ];
@@ -185,5 +185,5 @@
]; ];
colorscheme = if options.pywal then "pywal" else "tokyonight-storm"; colorscheme = if opts.pywal then "pywal" else "tokyonight-storm";
} }

View File

@@ -22,33 +22,33 @@
let let
nixvimLib = nixvim.lib.${system}; nixvimLib = nixvim.lib.${system};
nixvim' = nixvim.legacyPackages.${system}; nixvim' = nixvim.legacyPackages.${system};
nixvimModule = options: { nixvimModule = opts: {
inherit pkgs; inherit pkgs;
module = import ./config; # import the module directly module = import ./config; # import the module directly
# You can use `extraSpecialArgs` to pass additional arguments to your module files # You can use `extraSpecialArgs` to pass additional arguments to your module files
extraSpecialArgs = { extraSpecialArgs = {
inherit pkgs; inherit pkgs;
inherit options; inherit opts;
}; };
}; };
nvim = options: nixvim'.makeNixvimWithModule (nixvimModule options); nvim = opts: nixvim'.makeNixvimWithModule (nixvimModule opts);
in in
{ {
checks = { checks = {
# Run `nix flake check .` to verify that your config is not broken # Run `nix flake check .` to verify that your config is not broken
default = nixvimLib.check.mkTestDerivationFromNixvimModule (nixvimModule { options = { pywal = false; }; }); default = nixvimLib.check.mkTestDerivationFromNixvimModule (nixvimModule { opts = { pywal = false; }; });
}; };
packages = { packages = {
# Lets you run `nix run .` to start nixvim # Lets you run `nix run .` to start nixvim
default = nvim { default = nvim {
options = { opts = {
pywal = false; pywal = false;
}; };
}; };
pywal = nvim { pywal = nvim {
options = { opts = {
pywal = true; pywal = true;
}; };
}; };