dotfiles/common/general/tty_caps_esc.nix
RingOfStorms (Joshua Bell) 8b2a1b1f4f bunch of sliming down
2025-03-18 18:01:46 -05:00

33 lines
678 B
Nix

{
lib,
pkgs,
config,
...
}:
let
ccfg = import ../config.nix;
cfg_path = [
ccfg.custom_config_key
"general"
];
cfg = lib.attrsets.getAttrFromPath cfg_path config;
in
{
options =
{ }
// lib.attrsets.setAttrByPath cfg_path {
ttyCapsEscape = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable caps for escape key";
};
};
config = lib.mkIf cfg.ttyCapsEscape {
services.xserver.xkb.options = "caps:escape";
console = {
earlySetup = true;
packages = with pkgs; [ terminus_font ];
useXkbConfig = true; # use xkb.options in tty. (caps -> escape)
};
};
}