diff --git a/modules/home-manager/reo101-shell/default.nix b/modules/home-manager/reo101-shell/default.nix index 1aedcc4..4048fdd 100644 --- a/modules/home-manager/reo101-shell/default.nix +++ b/modules/home-manager/reo101-shell/default.nix @@ -273,6 +273,12 @@ in # (optionalString cfg.zoxide '' # 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 ]; diff --git a/modules/nix-darwin/brew/default.nix b/modules/nix-darwin/brew/default.nix index 879911b..05c4a68 100644 --- a/modules/nix-darwin/brew/default.nix +++ b/modules/nix-darwin/brew/default.nix @@ -54,6 +54,7 @@ in "android-platform-tools" "docker" "firefox" + "flameshot" "font-fira-code-nerd-font" "karabiner-elements" "notion" diff --git a/modules/nix-darwin/system/default.nix b/modules/nix-darwin/system/default.nix index f294241..e75cd0c 100644 --- a/modules/nix-darwin/system/default.nix +++ b/modules/nix-darwin/system/default.nix @@ -33,11 +33,18 @@ in security.pam.enableSudoTouchIdAuth = true; system = { + startup = { + chime = false; + }; keyboard = { remapCapsLockToControl = true; - nonUS.remapTilde = true; + # nonUS.remapTilde = true; enableKeyMapping = true; # Allows for skhd + userKeyMapping = [ + # { HIDKeyboardModifierMappingSrc = 30064771172; HIDKeyboardModifierMappingDst = 30064771125; } + { HIDKeyboardModifierMappingSrc = 30064771125; HIDKeyboardModifierMappingDst = 30064771172; } + ]; }; defaults = { diff --git a/modules/nix-darwin/yabai/borders/default.nix b/modules/nix-darwin/yabai/borders/default.nix new file mode 100755 index 0000000..908fdc5 --- /dev/null +++ b/modules/nix-darwin/yabai/borders/default.nix @@ -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 + ]; +} diff --git a/modules/nix-darwin/yabai/sketchybar/default.nix b/modules/nix-darwin/yabai/sketchybar/default.nix index ad22adb..bd0132b 100755 --- a/modules/nix-darwin/yabai/sketchybar/default.nix +++ b/modules/nix-darwin/yabai/sketchybar/default.nix @@ -1,4 +1,5 @@ # TODO: AppleSelectedInputSourcesChangedNotification +# TODO: no `PLUGIN_DIR` and `UTIL_DIR`, directly reference scripts { lib, darwin, ... }: let diff --git a/modules/nix-darwin/yabai/skhdrc b/modules/nix-darwin/yabai/skhdrc index 8005bd1..7dcc1d8 100644 --- a/modules/nix-darwin/yabai/skhdrc +++ b/modules/nix-darwin/yabai/skhdrc @@ -98,6 +98,9 @@ shift + cmd - space : \ yabai -m window --toggle border; \ sketchybar --trigger window_focus +# Prepare (next spawned window) to swallow parent +alt - s : yabai -m window --insert stack + # Restart Yabai shift + lctrl + alt - r : \ /usr/bin/env osascript <<< \