Open rayssd opened 2 months ago
Did you find any workarounds for this or a way to downgrade karabiner in nixpkgs?
@utkarshgupta137 it shouldn't require anything special, something like this is working fine for me (where nixpkgs-stable
is a flake input pinned to 24.05).
nixpkgs.overlays = [
(_: prev: {
# https://github.com/LnL7/nix-darwin/issues/1041
inherit (inputs.nixpkgs-stable.legacyPackages.${prev.system}) karabiner-elements;
})
];
I decided to set nix-darwin to follow the stable nixpkgs channel and use the 14.x Karabiner. This was a good reminder for me that OS-level things like nix-darwin should not use unstable packages.
Relevant part of my flake.nix
:
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs-stable";
};
I haven’t had the time to look into this but I’d review a PR fixing the module. It would need some conditionals around the package version to support multiple releases (I must cut branches soon…). I wouldn’t say this is particularly an unstable channel thing since it might still be broken by 24.11’s release if nobody gets around to fixing the module.
@ofalvai thanks it's a nice workaround
I decided to set nix-darwin to follow the stable nixpkgs channel and use the 14.x Karabiner. This was a good reminder for me that OS-level things like nix-darwin should not use unstable packages.
Relevant part of my
flake.nix
:nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05"; nix-darwin = { url = "github:LnL7/nix-darwin"; inputs.nixpkgs.follows = "nixpkgs-stable"; };
Hi,
After Karabiner-Elements v15.0, a darwin-rebuild causes the following error:
Upon inspection,
/nix/store/fkjp2mw8rmysra1fg3yxcm5n72am4309-launchd/user/Library/LaunchAgents/org.pqrs.karabiner.agent.karabiner_grabber.plist
links to${pkgs.karabiner-elements}/Library/LaunchAgents/org.pqrs.karabiner.agent.karabiner_observer.plist
The symlinks above are created here: https://github.com/LnL7/nix-darwin/blob/a8968d88e5a537b0491f68ce910749cd870bdbef/modules/services/karabiner-elements/default.nix#L119-L121
${pkgs.karabiner-elements}/Library/LaunchAgents/
is no longer a valid path because the folderLaunchAgents
no longer exists in v15.0It appears this is not the only breaking change though. It seems installing Karabiner-Elements v15.0 using
brew
introduces two new apps "Karabiner-Elements Non-Priviledged Agent.app" and "Karabiner-Elements Priviledged Daemons.app" in Login Items which weren't there before v15.0.