diff --git a/machines/common/darwin/default.nix b/machines/common/darwin/default.nix index 0ad9da2..18d6c29 100644 --- a/machines/common/darwin/default.nix +++ b/machines/common/darwin/default.nix @@ -1,4 +1,27 @@ -{lib, ...}: { +{ + lib, + pkgs, + ... +}: let + yabaiPkg = pkgs.yabai.overrideAttrs (oldAttrs: let + version = "5.0.6"; + srcs = { + "aarch64-darwin" = pkgs.fetchzip { + url = "https://github.com/koekeishiya/yabai/releases/download/v${version}/yabai-v${version}.tar.gz"; + sha256 = "sha256-wpm9VnR4yPk6Ybo/V2DMLgRcSzDl3dWGSKDCjYfz+xQ="; + }; + "x86_64-darwin" = pkgs.fetchFromGitHub { + owner = "koekeishiya"; + repo = "yabai"; + rev = "v${version}"; + sha256 = ""; + }; + }; + in { + inherit version; + src = srcs."${pkgs.stdenv.hostPlatform.system}" or (throw "Unsupported platform"); + }); +in { # manipulate the global /etc/zshenv for PATH, etc. programs.zsh.enable = true; @@ -15,6 +38,7 @@ services = { yabai = { enable = true; + package = yabaiPkg; enableScriptingAddition = true; logFile = "/var/tmp/yabai.log"; config = {