feat(darwin): override yabai

This commit is contained in:
winston 2023-06-16 05:42:11 +02:00
parent e124d22b77
commit ead893be66
Signed by: winston
GPG key ID: 3786770EDBC2B481

View file

@ -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 = {