console: use mkTarget
This commit is contained in:
parent
7b2e482da7
commit
59c782eb99
2 changed files with 56 additions and 55 deletions
|
|
@ -1,36 +1,35 @@
|
|||
{ config, lib, ... }:
|
||||
{ mkTarget, ... }:
|
||||
mkTarget {
|
||||
name = "console";
|
||||
humanName = "the Nix-on-Droid console";
|
||||
|
||||
{
|
||||
options.stylix.targets.console.enable =
|
||||
config.lib.stylix.mkEnableTarget "the Nix-on-Droid console" true;
|
||||
configElements =
|
||||
{ colors }:
|
||||
{
|
||||
terminal.colors = with colors.withHashtag; rec {
|
||||
background = base00;
|
||||
foreground = base05;
|
||||
cursor = base05;
|
||||
|
||||
config =
|
||||
lib.mkIf (config.stylix.enable && config.stylix.targets.console.enable)
|
||||
{
|
||||
terminal.colors = with config.lib.stylix.colors.withHashtag; rec {
|
||||
background = base00;
|
||||
foreground = base05;
|
||||
cursor = base05;
|
||||
# normal
|
||||
color0 = base00;
|
||||
color1 = base08;
|
||||
color2 = base0B;
|
||||
color3 = base0A;
|
||||
color4 = base0D;
|
||||
color5 = base0E;
|
||||
color6 = base0C;
|
||||
color7 = base05;
|
||||
|
||||
# normal
|
||||
color0 = base00;
|
||||
color1 = base08;
|
||||
color2 = base0B;
|
||||
color3 = base0A;
|
||||
color4 = base0D;
|
||||
color5 = base0E;
|
||||
color6 = base0C;
|
||||
color7 = base05;
|
||||
|
||||
# bright
|
||||
color8 = base02;
|
||||
color9 = color1;
|
||||
color10 = color2;
|
||||
color11 = color3;
|
||||
color12 = color4;
|
||||
color13 = color5;
|
||||
color14 = color6;
|
||||
color15 = base07;
|
||||
};
|
||||
# bright
|
||||
color8 = base02;
|
||||
color9 = color1;
|
||||
color10 = color2;
|
||||
color11 = color3;
|
||||
color12 = color4;
|
||||
color13 = color5;
|
||||
color14 = color6;
|
||||
color15 = base07;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,26 +1,28 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.stylix.targets.console.enable =
|
||||
config.lib.stylix.mkEnableTarget "the Linux kernel console" true;
|
||||
{ mkTarget, ... }:
|
||||
mkTarget {
|
||||
name = "console";
|
||||
humanName = "the Linux kernel console";
|
||||
|
||||
config.console.colors =
|
||||
with config.lib.stylix.colors;
|
||||
lib.mkIf (config.stylix.enable && config.stylix.targets.console.enable) [
|
||||
base00-hex
|
||||
red
|
||||
green
|
||||
yellow
|
||||
blue
|
||||
magenta
|
||||
cyan
|
||||
base05-hex
|
||||
base03-hex
|
||||
red
|
||||
green
|
||||
yellow
|
||||
blue
|
||||
magenta
|
||||
cyan
|
||||
base06-hex
|
||||
];
|
||||
configElements =
|
||||
{ colors }:
|
||||
{
|
||||
console.colors = with colors; [
|
||||
base00-hex
|
||||
red
|
||||
green
|
||||
yellow
|
||||
blue
|
||||
magenta
|
||||
cyan
|
||||
base05-hex
|
||||
base03-hex
|
||||
red
|
||||
green
|
||||
yellow
|
||||
blue
|
||||
magenta
|
||||
cyan
|
||||
base06-hex
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue