35 lines
699 B
Nix
Raw Normal View History

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