Compare commits

...

4 Commits

4 changed files with 42 additions and 6 deletions

8
flake.lock generated
View File

@@ -88,11 +88,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1703003068, "lastModified": 1706555256,
"narHash": "sha256-cAp7UbrQTiPAfNhIO9DRs271RUJJHPyBYchDJ4wDMd4=", "narHash": "sha256-nBLS68TsIbwd04oQRISqk/xaehZYWzGNDmdBOWpKWXw=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "ed6e88d1069557f1e68aa769934f008cb6c1fed5", "rev": "d3452d3f0a30162a8acdf11f452ac0ef3a3f5670",
"revCount": 45, "revCount": 46,
"type": "git", "type": "git",
"url": "https://git.syzygial.cc/Syzygial/EmacsConfig.git" "url": "https://git.syzygial.cc/Syzygial/EmacsConfig.git"
}, },

View File

@@ -1,4 +1,7 @@
{config, pkgs, lib, ...}: { {config, pkgs, lib, ...}: {
environment.systemPackages = with pkgs; [
sketchybar
];
services.sketchybar = { services.sketchybar = {
enable = true; enable = true;
config = '' config = ''

View File

@@ -2,6 +2,8 @@
services.skhd = { services.skhd = {
enable = true; enable = true;
skhdConfig = '' skhdConfig = ''
cmd + shift - e : open ${pkgs.mac-emacs}/Applications/Emacs.app
cmd + shift + ctrl - e : open ${pkgs.kitty}/Applications/Kitty.app
''; '';
}; };
} }

View File

@@ -1,12 +1,43 @@
{config, pkgs, lib, ...}: { {config, pkgs, lib, ...}: {
imports = [ imports = [
# Custom Bar # Custom Bar
./sketchybar.nix # ./sketchybar.nix
# TODO: Customize Bar Later
];
environment.systemPackages = with pkgs; [
yabai
]; ];
services.yabai = { services.yabai = {
enable = true; enable = true;
config = { config = {
layout = "bsp";
focus_follows_mouse = "autofocus";
auto_balance = "on";
top_padding = 5;
bottom_padding = 5;
left_padding = 5;
right_padding = 5;
window_gap = 5;
}; };
extraConfig = ''
yabai -m rule --add app='System Settings' manage=off
yabai -m rule --add app='Boot Camp Assistant' manage=off
yabai -m rule --add app='System Information' manage=off
'';
};
# https://github.com/IvarWithoutBones/dotfiles/blob/main/modules/darwin/yabai/default.nix
# The scripting addition needs root access to load, which we want to do automatically when logging in.
# Disable the password requirement for it so that a service can do so without user interaction.
environment.etc."sudoers.d/yabai-load-sa".text = ''
universelaptop ALL = (root) NOPASSWD: sha256:${builtins.hashFile "sha256" "${pkgs.yabai}/bin/yabai"} ${pkgs.yabai}/bin/yabai
'';
launchd.user.agents.yabai-load-sa = {
path = [ pkgs.yabai config.environment.systemPath ];
command = "/usr/bin/sudo ${pkgs.yabai}/bin/yabai --load-sa";
serviceConfig.RunAtLoad = true;
}; };
} }