worf: Add yabai/skhd. Add sarek as builder

This commit is contained in:
Felix Albrigtsen 2023-11-16 14:37:23 +01:00 committed by Felix Albrigtsen
parent a2e1f43902
commit 22e5555a4e
3 changed files with 85 additions and 2 deletions

View File

@ -79,7 +79,7 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDKzPICGew7uN0cmvRmbwkwTCodTBUgEhkoftQnZuO4Q felixalbrigtsen@gmail.com"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBTXSL0w7OUcz1LzEt1T3I3K5RgyNV+MYz0x/1RbpDHQ felixalb@worf"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFiPHhj0YbklJnJNcxD0IlzPxLTGfv095H5zyS/1Wb64 felixalb@edison.home.feal.no"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH5M7hYl3saBNMAo6sczgfUvASEJWFHuERB7xvf4gxst nix-builder-voyager-worf"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH5M7hYl3saBNMAo6sczgfUvASEJWFHuERB7xvf4gxst nix-builder-worf"
];
shell = pkgs.zsh;
};

View File

@ -1,6 +1,9 @@
{ pkgs, ... }:
{
# Many settings should be handled by home manager. System-wide settings are however managed here.
imports = [
./yabai.nix
];
nixpkgs.config.allowUnfree = true;
@ -28,7 +31,18 @@
mandatoryFeatures = [ ];
sshUser = "felixalb";
sshKey = "/var/root/.ssh/nix-builder-voyager";
sshKey = "/var/root/.ssh/nix-builder";
}
{
hostName = "sarek.home.feal.no";
system = "x86_64-linux";
maxJobs = 6;
supportedFeatures = [ "big-parallel" "benchmark" "nixos-test" ];
mandatoryFeatures = [ ];
sshUser = "felixalb";
sshKey = "/var/root/.ssh/nix-builder";
}
];

69
hosts/worf/yabai.nix Normal file
View File

@ -0,0 +1,69 @@
{ config, pkgs, lib, ... }:
let
cfg = config.services.yabai;
in {
services.yabai = {
enable = true;
enableScriptingAddition = true;
config = {
layout = "bsp";
debug_output = "on";
focus_follows_mouse = "autoraise";
mouse_follows_focus = "off";
window_placement = "second_child";
window_opacity = "off";
# top_padding = 10;
# bottom_padding = 10;
# left_padding = 10;
# right_padding = 10;
window_gap = 10;
};
};
services.skhd = {
enable = true;
skhdConfig = let
mod = "alt";
mod2 = "alt + ctrl";
mod3 = "alt + shift";
in ''
# Move window focus
${mod} - j : yabai -m window --focus south
${mod} - k : yabai -m window --focus north
${mod} - h : yabai -m window --focus west
${mod} - l : yabai -m window --focus east
${mod} - down : yabai -m window --focus south
${mod} - up : yabai -m window --focus north
${mod} - left : yabai -m window --focus west
${mod} - right : yabai -m window --focus east
# Move windows
${mod3} - j : yabai -m window --warp south
${mod3} - k : yabai -m window --warp north
${mod3} - h : yabai -m window --warp west
${mod3} - l : yabai -m window --warp east
${mod3} - down : yabai -m window --warp south
${mod3} - up : yabai -m window --warp north
${mod3} - left : yabai -m window --warp west
${mod3} - right : yabai -m window --warp east
# Move windows to different spaces
${mod2} - 1 : yabai -m window --space 1
${mod2} - 2 : yabai -m window --space 2
${mod2} - 3 : yabai -m window --space 3
${mod2} - 4 : yabai -m window --space 4
${mod2} - 5 : yabai -m window --space 5
${mod2} - 6 : yabai -m window --space 6
${mod2} - 7 : yabai -m window --space 7
# Misc
${mod2} - f : yabai -m window --toggle zoom-fullscreen
${mod2} - b : yabai -m space --balance
${mod3} - space : yabai -m window --toggle float --grid 4:4:1:1:2:2
'';
};
}