dotfiles/.config/nix/modules/darwin/default.nix
2023-09-18 22:31:41 +02:00

77 lines
1.9 KiB
Nix

({ pkgs, ... }: {
programs.zsh.enable = true;
environment = {
shells = with pkgs; [ bash zsh fish ];
loginShell = pkgs.zsh;
systemPath = [ "/opt/homebrew/bin" ];
pathsToLink = [ "/Applications" ];
};
fonts.fonts = [
(pkgs.nerdfonts.override {
fonts = [
"FiraCode"
"Iosevka"
"IosevkaTerm"
"JetBrainsMono"
"SourceCodePro"
];
})
];
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
services.nix-daemon.enable = true;
services.yabai = {
enable = true;
package = pkgs.yabai;
enableScriptingAddition = true;
config = {
layout = "bsp";
window_placement = "second_child";
top_padding = 8;
bottom_padding = 8;
left_padding = 8;
right_padding = 8;
window_gap = 8;
mouse_follows_focus = "on";
mouse_modifier = "alt";
mouse_action1 = "move";
mouse_action2 = "resize";
mouse_drop_action = "swap";
};
extraConfig = ''
yabai -m rule --add app="^System Settings$" manage=off
'';
};
services.skhd = {
enable = true;
skhdConfig = ''
alt - h : yabai -m window --focus west
alt - l : yabai -m window --focus east
alt - j : yabai -m window --focus south
alt - k : yabai -m window --focus north
alt - p : yabei -m display --focus west
alt - n : yabei -m display --focus east
alt - y : yabai -m space --mirror x-axis
alt - m : yabai -m window --toggle zoom-fullscreen
'';
};
system.defaults = {
dock.autohide = true;
dock.mru-spaces = false;
dock.orientation = "right";
NSGlobalDomain.InitialKeyRepeat = 14;
NSGlobalDomain.KeyRepeat = 1;
finder.AppleShowAllExtensions = true;
finder.AppleShowAllFiles = true;
finder.CreateDesktop = false;
};
users.users.tobi.home = "/Users/tobi";
homebrew = {
enable = true;
brews = [
"imagemagick"
"trippy"
];
};
})