refactor(nix/darwin): Swap ESC<->CapsLock with Kanata
This commit is contained in:
parent
b48174745d
commit
da9dcf8bdc
7 changed files with 99 additions and 14 deletions
25
nix/modules/darwin/kanata.nix
Normal file
25
nix/modules/darwin/kanata.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ user }:
|
||||
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
launchd.user.agents.kanata = {
|
||||
command = "/usr/bin/sudo ${pkgs.kanata}/bin/kanata -c ${../../../include/kanata.kbd} -n";
|
||||
serviceConfig = {
|
||||
UserName = user;
|
||||
RunAtLoad = true;
|
||||
KeepAlive = {
|
||||
SuccessfulExit = false;
|
||||
Crashed = true;
|
||||
};
|
||||
StandardErrorPath = "/Users/${user}/.logs/kanata.err.log";
|
||||
StandardOutPath = "/Users/${user}/.logs/kanata.out.log";
|
||||
ProcessType = "Interactive";
|
||||
Nice = -30;
|
||||
};
|
||||
};
|
||||
|
||||
security.sudo.extraConfig = ''
|
||||
${user} ALL=(ALL) NOPASSWD: ${pkgs.kanata}/bin/kanata
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue