mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +00:00
[Desktop/Console] Prepare enhanced console support
This commit is contained in:
parent
d28784953c
commit
3416802ae7
1 changed files with 23 additions and 0 deletions
23
desktop/console.nix
Normal file
23
desktop/console.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
xcfg = config.services.xserver;
|
||||||
|
generalCfg = config.aviallon.general;
|
||||||
|
in {
|
||||||
|
config = {
|
||||||
|
services.kmscon = {
|
||||||
|
hwRender = mkDefault xcfg.enable;
|
||||||
|
extraConfig = ""
|
||||||
|
+ optionalString ( ! isNull xcfg.layout )
|
||||||
|
"xkb-layout=${xcfg.layout}"
|
||||||
|
+ optionalString ( ! isNull xcfg.xkbVariant )
|
||||||
|
"xkb-variant=${xcfg.xkbVariant}"
|
||||||
|
+ optionalString ( ! isNull xcfg.xkbOptions )
|
||||||
|
"xkb-options=${xcfg.xkbOptions}"
|
||||||
|
+ "font-dpi=${toString (xcfg.dpi or 96)}"
|
||||||
|
;
|
||||||
|
enable = mkDefault (! generalCfg.minimal );
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue