40 lines
1.0 KiB
Nix
40 lines
1.0 KiB
Nix
{ pkgs, xdg-runtime-dir, emacs, ... }:
|
|
let
|
|
appName = "EmacsClient";
|
|
icon = "${emacs}/Applications/Emacs.app/Contents/Resources/Emacs.icns";
|
|
|
|
emacsclient = pkgs.stdenv.mkDerivation {
|
|
name = appName;
|
|
src = ./. ;
|
|
installPhase = ./emacs_build.sh;
|
|
XDG_RUNTIME_DIR = xdg-runtime-dir;
|
|
inherit emacs appName icon;
|
|
};
|
|
in {
|
|
home.packages = [ emacsclient ];
|
|
|
|
# Swap right keys (command, shift and alt) at login
|
|
launchd.agents.swap-keys = {
|
|
enable = true;
|
|
config = {
|
|
Label = "swap-keys";
|
|
Program = /usr/bin/hidutil;
|
|
ProgramArguments = [
|
|
"property" "--set" ''
|
|
[{
|
|
"HIDKeyboardModifierMappingSrc":0x7000000e7,
|
|
"HIDKeyboardModifierMappingDst":0x7000000e1,
|
|
}, {
|
|
"HIDKeyboardModifierMappingSrc":0x7000000e5,
|
|
"HIDKeyboardModifierMappingDst":0x7000000e6,
|
|
}, {
|
|
"HIDKeyboardModifierMappingSrc":0x7000000e6,
|
|
"HIDKeyboardModifierMappingDst":0x7000000e3,
|
|
}]
|
|
''
|
|
];
|
|
};
|
|
};
|
|
}
|
|
|