feat(nixos:appearance): move appearance options to nixos
This commit is contained in:
parent
cedeb52103
commit
ceb66c03cf
51 changed files with 393 additions and 377 deletions
30
nixos/options/appearance/colors.nix
Normal file
30
nixos/options/appearance/colors.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOption;
|
||||
inherit (lib.types) str enum attrsOf;
|
||||
|
||||
cfg = config.ooknet.colorscheme;
|
||||
in {
|
||||
# simple colorscheme module bases on misterio77/nix-colors
|
||||
options.ooknet.colorscheme = {
|
||||
name = mkOption {
|
||||
type = enum ["hozen"];
|
||||
default = "hozen";
|
||||
};
|
||||
variant = mkOption {
|
||||
type = enum ["dark" "light"];
|
||||
default = "dark";
|
||||
};
|
||||
slug = mkOption {
|
||||
type = str;
|
||||
default = "${toString cfg.name-cfg.variant}";
|
||||
};
|
||||
palette = {
|
||||
type = attrsOf str;
|
||||
default = (import ./palettes/${cfg.slug}.nix).colorscheme.palette;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue