1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-31 04:04:45 +00:00

Replace Karabiner-specific /run/wrappers/bin implementation

This commit is contained in:
Sam 2024-08-08 20:22:13 -07:00
parent ef8b45c7c0
commit 30ec028267
No known key found for this signature in database
GPG key ID: 07C4B9795517E3B4

View file

@ -86,16 +86,11 @@ in
serviceConfig.RunAtLoad = true;
};
# We need this to run every reboot as /run gets nuked so we can't put this
# inside the preActivation script as it only gets run on darwin-rebuild switch.
launchd.daemons.setsuid_karabiner_session_monitor = {
script = ''
rm -rf /run/wrappers
mkdir -p /run/wrappers/bin
install -m4555 "${cfg.package}/Library/Application Support/org.pqrs/Karabiner-Elements/bin/karabiner_session_monitor" /run/wrappers/bin
'';
serviceConfig.RunAtLoad = true;
serviceConfig.KeepAlive.SuccessfulExit = false;
security.wrappers.karabiner_session_monitor = {
setuid = true;
owner = "root";
group = "wheel";
source = "${pkgs.karabiner-elements}/Library/Application Support/org.pqrs/Karabiner-Elements/bin/karabiner_session_monitor";
};
launchd.user.agents.karabiner_session_monitor = {