punkfairie
f26b1be83f
Some checks are pending
CI / Format Nix files (push) Waiting to run
CI / Test Modules (push) Waiting to run
CI / Validate sources (push) Waiting to run
Release / Make release (push) Waiting to run
Release / Publish to Flake registries (push) Blocked by required conditions
Build & deploy website / Build site (push) Waiting to run
Build & deploy website / Deploy website (push) Blocked by required conditions
40 lines
774 B
Nix
40 lines
774 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"
|
|
]
|
|
);
|
|
}
|