mirror of
https://github.com/danth/stylix
synced 2024-11-25 21:50:22 +00:00
Set font face for kmscon (#195)
This commit is contained in:
parent
17a452c5d5
commit
b5ad31b710
1 changed files with 5 additions and 3 deletions
|
@ -3,15 +3,16 @@
|
||||||
options.stylix.targets.kmscon.enable =
|
options.stylix.targets.kmscon.enable =
|
||||||
config.lib.stylix.mkEnableTarget "the kmscon virtual console" true;
|
config.lib.stylix.mkEnableTarget "the kmscon virtual console" true;
|
||||||
|
|
||||||
config.services.kmscon.extraConfig =
|
config.services.kmscon = lib.mkIf config.stylix.targets.kmscon.enable {
|
||||||
|
fonts = [config.stylix.fonts.monospace];
|
||||||
|
extraConfig =
|
||||||
let
|
let
|
||||||
formatBase = name:
|
formatBase = name:
|
||||||
let
|
let
|
||||||
getComponent = comp: config.lib.stylix.colors."${name}-rgb-${comp}";
|
getComponent = comp: config.lib.stylix.colors."${name}-rgb-${comp}";
|
||||||
in
|
in
|
||||||
"${getComponent "r"},${getComponent "g"},${getComponent "b"}";
|
"${getComponent "r"},${getComponent "g"},${getComponent "b"}";
|
||||||
in
|
in ''
|
||||||
lib.mkIf config.stylix.targets.kmscon.enable ''
|
|
||||||
font-size=${builtins.toString config.stylix.fonts.sizes.terminal}
|
font-size=${builtins.toString config.stylix.fonts.sizes.terminal}
|
||||||
|
|
||||||
palette=custom
|
palette=custom
|
||||||
|
@ -36,4 +37,5 @@
|
||||||
palette-background=${formatBase "base00"}
|
palette-background=${formatBase "base00"}
|
||||||
palette-foreground=${formatBase "base05"}
|
palette-foreground=${formatBase "base05"}
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue