os/shared/home/theme.nix
2023-05-21 22:09:59 +00:00

61 lines
No EOL
1.3 KiB
Nix

{ lib, ... }:
with lib;
with types;
let colorOpt = mkOption {
type = submodule {
options = {
basic = mkOption { type = str; };
major = mkOption { type = str; };
minor = mkOption { type = str; };
};
};
};
in {
options.theme = mkOption {
type = submodule {
options = {
background = colorOpt;
foreground = colorOpt;
failure = mkOption { type = str; };
success = mkOption { type = str; };
warning = mkOption { type = str; };
accent = mkOption {
type = submodule {
options = {
primary = colorOpt;
secondary = colorOpt;
tertiary = colorOpt;
ordered = listToAttrs
(genList (n: { name = "${n}"; value = colorOpt; }) 8);
};
};
};
colors = mkOption {
description = ''
Colors by their name.
'';
type = submodule {
options = {
red = colorOpt;
green = colorOpt;
blue = colorOpt;
cyan = colorOpt;
purple = colorOpt;
pink = colorOpt;
yellow = colorOpt;
orange = colorOpt;
};
};
};
};
};
};
}