adding option for default colorscheme

This commit is contained in:
2025-01-16 14:37:33 -06:00
parent 7521112f1a
commit 1f6f0e87a0
2 changed files with 17 additions and 6 deletions

View File

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

View File

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