This commit is contained in:
Harald Hoyer 2024-01-11 10:26:46 +00:00
parent 66c05f9093
commit 45d6f4b0f3
205 changed files with 9040 additions and 342 deletions

View file

@ -0,0 +1 @@
{ "~a" = (); "~b" = (); "~c" = (); "~d" = (); "~e" = (); "~f" = (); "~g" = (); "~h" = (); "~i" = (); "~j" = (); "~k" = (); "~l" = (); "~m" = (); "~n" = (); "~o" = (); "~p" = (); "~q" = (); "~r" = (); "~s" = (); "~t" = (); "~u" = (); "~v" = (); "~w" = (); "~x" = (); "~y" = (); "~z" = (); }

View file

@ -0,0 +1,55 @@
{ options, config, pkgs, lib, ... }:
with lib;
with lib.plusultra;
let cfg = config.plusultra.system.input;
in
{
options.plusultra.system.input = with types; {
enable = mkEnableOption "macOS input";
};
config = mkIf cfg.enable (mkMerge [
{
system = {
keyboard = {
enableKeyMapping = true;
remapCapsLockToEscape = true;
};
defaults = {
".GlobalPreferences" = {
"com.apple.mouse.scaling" = "1";
};
NSGlobalDomain = {
AppleKeyboardUIMode = 3;
ApplePressAndHoldEnabled = false;
KeyRepeat = 2;
InitialKeyRepeat = 15;
NSAutomaticCapitalizationEnabled = false;
NSAutomaticDashSubstitutionEnabled = false;
NSAutomaticQuoteSubstitutionEnabled = false;
NSAutomaticPeriodSubstitutionEnabled = false;
NSAutomaticSpellingCorrectionEnabled = false;
};
};
};
snowfallorg.user.${config.plusultra.user.name}.home.config = {
home.activation = {
# Disable special keys when using Option as a modifier.
# https://superuser.com/questions/941286/disable-default-option-key-binding
disableSpecialKeys = lib.home-manager.hm.dag.entryAfter [ "writeBoundary" ] ''
set +e
$DRY_RUN_CMD /usr/bin/sudo mkdir -p $HOME/Library/KeyBindings
$DRY_RUN_CMD /usr/bin/sudo cp '${builtins.toPath ./DefaultKeyBinding.dict}' "$HOME/Library/KeyBindings/DefaultKeyBinding.dict"
set -e
'';
};
};
}
]);
}