punkfairie
190737eca1
Nix was complaining that paths weren't absolute so I just made the JSON file its own repo so I can import it with npins.
38 lines
772 B
Nix
38 lines
772 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (config.rose-pine) sources;
|
|
|
|
cfg = config.console.rose-pine;
|
|
enable = cfg.enable && config.console.enable;
|
|
|
|
palette = (lib.importJSON "${sources.rose-pine-palette}/palette.json").${cfg.flavor}.colors;
|
|
in {
|
|
options.console.rose-pine = lib.rp.mkRosePineOpt {name = "console";};
|
|
|
|
config.console.colors = lib.mkIf enable (
|
|
# Manually populate with colors from rose-pine/linux-tty
|
|
# Make sure to strip initial # from hex codes
|
|
map (color: (builtins.substring 1 6 palette.${color}.hex)) [
|
|
"base"
|
|
"love"
|
|
"foam"
|
|
"gold"
|
|
"pine"
|
|
"iris"
|
|
"rose"
|
|
"text"
|
|
|
|
"overlay"
|
|
"love"
|
|
"foam"
|
|
"gold"
|
|
"pine"
|
|
"iris"
|
|
"rose"
|
|
"text"
|
|
]
|
|
);
|
|
}
|