{ config, lib, pkgs, ...}: with lib; let cfg = config.programs.mac-keys; in { options.programs.mac-keys = { enable = mkEnableOption "Mac-Keys"; }; config = lib.mkIf cfg.enable { home.file.".Xmodmap".text = '' remove Lock = Caps_Lock add Lock = Escape keysym Caps_Lock = Escape keysym Escape = Caps_Lock clear mod4 keycode 255 = Tab keycode 23 = Hyper_L keycode 134 = ISO_Level3_Shift keycode 108 = Super_R ''; }; }