feat(darwin)!: update config
Add `nix` initialization script to shell's `extraConfig` - fixes `nix` when updating MacOS Add `flameshot` to `brew` packages Fix tilde (`~`) remapping - mysteriously switched after a restart, needed to swap Add (noncompiling) `borders` (`JankyBorders`) config Add `TODO` to `sketchybar` config
This commit is contained in:
parent
4a12826d66
commit
ff04252a67
6 changed files with 45 additions and 1 deletions
|
@ -273,6 +273,12 @@ in
|
||||||
# (optionalString cfg.zoxide ''
|
# (optionalString cfg.zoxide ''
|
||||||
# eval "$(${pkgs.zoxide}/bin/zoxide init zsh)"
|
# eval "$(${pkgs.zoxide}/bin/zoxide init zsh)"
|
||||||
# '')
|
# '')
|
||||||
|
''
|
||||||
|
# Prevent macOS updates from destroying nix
|
||||||
|
if [ -e "/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh" ]; then
|
||||||
|
source "/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh"
|
||||||
|
fi
|
||||||
|
''
|
||||||
# cfg.extraConfig
|
# cfg.extraConfig
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,7 @@ in
|
||||||
"android-platform-tools"
|
"android-platform-tools"
|
||||||
"docker"
|
"docker"
|
||||||
"firefox"
|
"firefox"
|
||||||
|
"flameshot"
|
||||||
"font-fira-code-nerd-font"
|
"font-fira-code-nerd-font"
|
||||||
"karabiner-elements"
|
"karabiner-elements"
|
||||||
"notion"
|
"notion"
|
||||||
|
|
|
@ -33,11 +33,18 @@ in
|
||||||
security.pam.enableSudoTouchIdAuth = true;
|
security.pam.enableSudoTouchIdAuth = true;
|
||||||
|
|
||||||
system = {
|
system = {
|
||||||
|
startup = {
|
||||||
|
chime = false;
|
||||||
|
};
|
||||||
|
|
||||||
keyboard = {
|
keyboard = {
|
||||||
remapCapsLockToControl = true;
|
remapCapsLockToControl = true;
|
||||||
nonUS.remapTilde = true;
|
# nonUS.remapTilde = true;
|
||||||
enableKeyMapping = true; # Allows for skhd
|
enableKeyMapping = true; # Allows for skhd
|
||||||
|
userKeyMapping = [
|
||||||
|
# { HIDKeyboardModifierMappingSrc = 30064771172; HIDKeyboardModifierMappingDst = 30064771125; }
|
||||||
|
{ HIDKeyboardModifierMappingSrc = 30064771125; HIDKeyboardModifierMappingDst = 30064771172; }
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
|
|
26
modules/nix-darwin/yabai/borders/default.nix
Executable file
26
modules/nix-darwin/yabai/borders/default.nix
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
{ lib, fetchFromGitHub, darwin, ... }:
|
||||||
|
|
||||||
|
# TODO: fix clang issue (works with native `/usr/bin/clang`)
|
||||||
|
#
|
||||||
|
# > Undefined symbols for architecture arm64:
|
||||||
|
# > "_SLSWindowManagementBridgeSetDelegate", referenced from:
|
||||||
|
# > _main in main.o
|
||||||
|
# > ld: symbol(s) not found for architecture arm64
|
||||||
|
|
||||||
|
darwin.apple_sdk.stdenv.mkDerivation rec {
|
||||||
|
pname = "JankyBorders";
|
||||||
|
version = "dev";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "FelixKratz";
|
||||||
|
repo = "JankyBorders";
|
||||||
|
rev = "6bc201813bc163c6f5a20d5fa744f7b0d1f31773";
|
||||||
|
sha256 = "sha256-b4+aJkP1yqz8x5EUDDVQmqrmLus+Y69RViAeaLvfGXE=";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = with darwin.apple_sdk.frameworks; [
|
||||||
|
AppKit
|
||||||
|
SkyLight
|
||||||
|
darwin.apple_sdk.Libsystem
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,4 +1,5 @@
|
||||||
# TODO: AppleSelectedInputSourcesChangedNotification
|
# TODO: AppleSelectedInputSourcesChangedNotification
|
||||||
|
# TODO: no `PLUGIN_DIR` and `UTIL_DIR`, directly reference scripts
|
||||||
{ lib, darwin, ... }:
|
{ lib, darwin, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
|
@ -98,6 +98,9 @@ shift + cmd - space : \
|
||||||
yabai -m window --toggle border; \
|
yabai -m window --toggle border; \
|
||||||
sketchybar --trigger window_focus
|
sketchybar --trigger window_focus
|
||||||
|
|
||||||
|
# Prepare (next spawned window) to swallow parent
|
||||||
|
alt - s : yabai -m window --insert stack
|
||||||
|
|
||||||
# Restart Yabai
|
# Restart Yabai
|
||||||
shift + lctrl + alt - r : \
|
shift + lctrl + alt - r : \
|
||||||
/usr/bin/env osascript <<< \
|
/usr/bin/env osascript <<< \
|
||||||
|
|
Loading…
Reference in a new issue