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

35 lines
699 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
2025-02-17 14:38:32 +00:00
cfg = config.desktop.theming.themes.gruvbox;
2024-07-18 04:08:27 +00:00
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 = {
2025-02-17 14:38:32 +00:00
desktop.theming.themes.gruvbox = {
2024-07-18 04:08:27 +00:00
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.";
};
};
};
2025-02-17 14:38:32 +00:00
config.desktop.theming = mkIf cfg.enable {
2024-07-18 04:08:27 +00:00
darkMode = cfg.darkMode;
colorScheme = "${pkgs.base16-schemes}/share/themes/gruvbox-${mode}-${cfg.contrast}.yaml";
};
}