dotfiles/user-modules/theming/themes/gruvbox.nix

35 lines
675 B
Nix
Raw Normal View History

2024-07-19 12:00:55 +00:00
{
config,
lib,
pkgs,
...
}:
2024-07-18 04:08:27 +00:00
with lib;
let
cfg = config.theming.themes.gruvbox;
mode = if cfg.darkMode then "dark" else "light";
2024-07-19 12:00:55 +00:00
in
{
2024-07-18 04:08:27 +00:00
options = {
theming.themes.gruvbox = {
enable = mkEnableOption "gruvbox-hard";
darkMode = mkEnableOption "dark mode";
contrast = mkOption {
2024-07-19 12:00:55 +00:00
type = types.enum [
"hard"
"medium"
"soft"
];
2024-07-18 04:08:27 +00:00
default = "hard";
description = "The contrast level of the theme.";
};
};
};
config.theming = mkIf cfg.enable {
darkMode = cfg.darkMode;
colorScheme = "${pkgs.base16-schemes}/share/themes/gruvbox-${mode}-${cfg.contrast}.yaml";
};
}