Skip to content

prinzdezibel/macos-keybindings

Repository files navigation

macos-keybindings

MacOS keybindings for NixOS

Requirements

  • NixOS Linux
  • Wayland or Xorg
  • KWin window manager
  • KDE Plasma Desktop
  • English keyboard layout

Features

  • 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

Notice

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.

Installation for flake based setup (recommended)

{
  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";
            }];
          }
      ];
    };
  };
}

Installation for module based setup

  1. Add channel
$ sudo nix-channel --add https://github.com/prinzdezibel/macos-keybindings/archive/main.tar.gz macos-keybindings
$ sudo nix-channel --update
  1. 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";
  }];

}

About

MacOS keybindings for NixOS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published