MacOS keybindings for NixOS
- NixOS Linux
- Wayland or Xorg
- KWin window manager
- KDE Plasma Desktop
- English keyboard layout
- Generic MacOS shortcuts for all applications through keymapper
- KWin & Plasma shortcuts that emulate their MacOS counterparts
- Support for application specific keymappings
- VS Code Keymapping plugin
- Matches exactly the official MacOS shortcuts
Keyboard layout will be changed to English (intl., with AltGr dead keys) for keymapper to work properly. Various shortcuts in System Settings will be defined/overwritten.
{
description = "NixOS configuration";
inputs = {
[...]
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
macos-keybindings = {
url = "github:prinzdezibel/macos-keybindings";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {self, macos-keybindings, ...} : {
nixosConfigurations.nixos = inputs.nixpkgs.lib.nixosSystem {
modules = [
macos-keybindings.nixosModules
{
accounts = [{
user = "michael";
apps = [ "vs-code" ];
wm = "KWin";
de = "Plasma";
}];
}
];
};
};
}
- Add channel
$ sudo nix-channel --add https://github.com/prinzdezibel/macos-keybindings/archive/main.tar.gz macos-keybindings
$ sudo nix-channel --update
- Add macos-keybindings module to configuration.nix
{ config, pkgs, ...}:
{
imports = [
./hardware-configuration.nix
<macos-keybindings/modules>
]
macos-keybindings = [{
user = "michael";
apps = [ "vs-code" ];
wm = "KWin";
de = "Plasma";
}];
}