Leverage the services.kmscon.config attribute set, following upstream
commit [1] ("nixos/kmscon: RFC42 treatment, support version 10.0.0").
[1]: 9b9e0a021a
Closes: https://github.com/nix-community/stylix/issues/2334
Link: https://github.com/nix-community/stylix/pull/2337
Link: https://github.com/nix-community/stylix/pull/2338
Link: https://github.com/nix-community/stylix/pull/2351
Co-authored-by: Bad3r <github@unsigned.sh>
Approved-by: Jason Bowman <jason@json64.dev>
Reviewed-by: 0xda157 <da157@voidq.com>
Reviewed-by: pancho horrillo <pancho@pancho.name>
Reviewed-by: Noah Biewesch <dev@noahbiewesch.com>
48 lines
1.4 KiB
Nix
48 lines
1.4 KiB
Nix
{ mkTarget, ... }:
|
|
mkTarget {
|
|
config = [
|
|
(
|
|
{ fonts }:
|
|
{
|
|
services.kmscon.config = {
|
|
font-name = fonts.monospace.name;
|
|
font-size = fonts.sizes.terminal;
|
|
};
|
|
}
|
|
)
|
|
(
|
|
{ colors }:
|
|
let
|
|
formatBase =
|
|
name:
|
|
let
|
|
getComponent = comp: colors."${name}-rgb-${comp}";
|
|
in
|
|
"${getComponent "r"},${getComponent "g"},${getComponent "b"}";
|
|
in
|
|
{
|
|
services.kmscon.config = {
|
|
palette = "custom";
|
|
palette-black = formatBase "base00";
|
|
palette-red = formatBase "base08";
|
|
palette-green = formatBase "base0B";
|
|
palette-yellow = formatBase "base0A";
|
|
palette-blue = formatBase "base0D";
|
|
palette-magenta = formatBase "base0E";
|
|
palette-cyan = formatBase "base0C";
|
|
palette-light-grey = formatBase "base05";
|
|
palette-dark-grey = formatBase "base03";
|
|
palette-light-red = formatBase "base08";
|
|
palette-light-green = formatBase "base0B";
|
|
palette-light-yellow = formatBase "base0A";
|
|
palette-light-blue = formatBase "base0D";
|
|
palette-light-magenta = formatBase "base0E";
|
|
palette-light-cyan = formatBase "base0C";
|
|
palette-white = formatBase "base07";
|
|
palette-background = formatBase "base00";
|
|
palette-foreground = formatBase "base05";
|
|
};
|
|
}
|
|
)
|
|
];
|
|
}
|