global/kmscon: init, refactored from software/console
This commit is contained in:
parent
9041ce8142
commit
81a64e3c22
2 changed files with 17 additions and 38 deletions
|
@ -1,38 +0,0 @@
|
|||
{ config, options, lib, ... }:
|
||||
with lib;
|
||||
with lib.our;
|
||||
let
|
||||
cfg = config.modules.software.console;
|
||||
opt = options.modules.software.console;
|
||||
in
|
||||
{
|
||||
options.modules.software.console = with types; {
|
||||
kmscon = {
|
||||
enable = mkBoolOpt true;
|
||||
font = {
|
||||
size = mkOpt int 14;
|
||||
font = mkOpt str (head config.modules.locale.fonts.defaults.monospace);
|
||||
};
|
||||
extraOptions = mkOpt (separatedString " ") "";
|
||||
extraConfig = mkOpt lines "";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
earlySetup = true;
|
||||
};
|
||||
|
||||
services.kmscon = mkIf cfg.kmscon.enable {
|
||||
enable = true;
|
||||
hwRender = true;
|
||||
extraConfig = ''
|
||||
font-size=${toString cfg.kmscon.font.size}
|
||||
font-name=${cfg.kmscon.font.font}
|
||||
${cfg.kmscon.extraConfig}
|
||||
'';
|
||||
extraOptions = mkAliasDefinitions opt.kmscon.extraOptions;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue