diff --git a/home-manager/hosts/marisa/aerospace.nix b/home-manager/hosts/marisa/aerospace.nix new file mode 100644 index 0000000..d99b833 --- /dev/null +++ b/home-manager/hosts/marisa/aerospace.nix @@ -0,0 +1,127 @@ +{...}: { + home.file.".aerospace.toml".text = '' + # Start aerospace at login + start-at-login = true + + enable-normalization-flatten-containers = true + enable-normalization-opposite-orientation-for-nested-containers = true + + accordion-padding = 30 + + default-root-container-layout = 'tiles' + + on-focused-monitor-changed = ['move-mouse monitor-lazy-center'] + + [key-mapping] + preset = 'qwerty' + + [gaps] + inner.vertical = 8 + inner.horizontal = 8 + outer.top = 8 + outer.left = 8 + outer.right = 8 + outer.bottom = 8 + + [mode.main.binding] + + # Change split layout + alt-slash = 'layout tiles horizontal vertical' + alt-comma = 'layout accordion horizontal vertical' + + # Terminal + alt-enter = 'exec-and-forget open -n /Users/alliana/Applications/Home Manager Apps/Alacritty.app' + alt-t = 'exec-and-forget open -n /Users/alliana/Applications/Home Manager Apps/Alacritty.app' + + # Window Focus + alt-h = 'focus left' + alt-j = 'focus down' + alt-k = 'focus up' + alt-l = 'focus right' + + # Window Move + alt-shift-h = 'move left' + alt-shift-j = 'move down' + alt-shift-k = 'move up' + alt-shift-l = 'move right' + + # Window Resize + alt-shift-minus = 'resize smart -50' + alt-shift-equal = 'resize smart +50' + + # Switch workspaces + alt-1 = 'workspace 1' + alt-2 = 'workspace 2' + alt-3 = 'workspace 3' + alt-4 = 'workspace 4' + alt-5 = 'workspace 5' + alt-6 = 'workspace 6' + alt-7 = 'workspace 7' + alt-8 = 'workspace 8' + alt-9 = 'workspace 9' + alt-0 = 'workspace 0' + + # Window move to workspaces + alt-shift-1 = 'move-node-to-workspace 1' + alt-shift-2 = 'move-node-to-workspace 2' + alt-shift-3 = 'move-node-to-workspace 3' + alt-shift-4 = 'move-node-to-workspace 4' + alt-shift-5 = 'move-node-to-workspace 5' + alt-shift-6 = 'move-node-to-workspace 6' + alt-shift-7 = 'move-node-to-workspace 7' + alt-shift-8 = 'move-node-to-workspace 8' + alt-shift-9 = 'move-node-to-workspace 9' + alt-shift-0 = 'move-node-to-workspace 0' + + # Switch workspaces with F-row + f1 = 'workspace 1' + f2 = 'workspace 2' + f3 = 'workspace 3' + f4 = 'workspace 4' + f5 = 'workspace 5' + f6 = 'workspace 6' + f7 = 'workspace 7' + f8 = 'workspace 8' + f9 = 'workspace 9' + f10 = 'workspace 0' + + # Window move to workspaces with F-row + shift-f1 = 'move-node-to-workspace 1' + shift-f2 = 'move-node-to-workspace 2' + shift-f3 = 'move-node-to-workspace 3' + shift-f4 = 'move-node-to-workspace 4' + shift-f5 = 'move-node-to-workspace 5' + shift-f6 = 'move-node-to-workspace 6' + shift-f7 = 'move-node-to-workspace 7' + shift-f8 = 'move-node-to-workspace 8' + shift-f9 = 'move-node-to-workspace 9' + shift-f10 = 'move-node-to-workspace 0' + + # Mode service + alt-shift-semicolon = 'mode service' + + # workspace assignment + [workspace-to-monitor-force-assignment] + 1 = 'main' + 2 = 'main' + 3 = 'main' + 4 = 'main' + 5 = 'main' + 6 = ['secondary', 'main'] + 7 = ['secondary', 'main'] + 8 = ['secondary', 'main'] + 9 = ['secondary', 'main'] + 0 = ['secondary', 'main'] + + [mode.service.binding] + esc = ['reload-config', 'mode main'] + + [[on-window-detected]] + if.app-id = 'company.thebrowser.Browser' + run = 'move-node-to-workspace 1' + + [[on-window-detected]] + if.app-id = 'org.alacritty' + run = 'move-node-to-workspace 2' + ''; +} diff --git a/home-manager/hosts/marisa/default.nix b/home-manager/hosts/marisa/default.nix index 4500d56..d944dd8 100644 --- a/home-manager/hosts/marisa/default.nix +++ b/home-manager/hosts/marisa/default.nix @@ -5,13 +5,13 @@ in rec { imports = [ ./alacritty.nix + ./aerospace.nix ./git.nix ]; home.packages = with pkgs; [ gcc alacritty - # _1password-gui ]; home.activation = { @@ -27,6 +27,10 @@ rec { stateVersion = "24.11"; }; + home.file.".hushlogin" = { + text = ""; + }; + targets.darwin.defaults = { # DS_Store "com.apple.desktopservices" = { diff --git a/nix-darwin/brew.nix b/nix-darwin/brew.nix index ccf3497..290ab7c 100644 --- a/nix-darwin/brew.nix +++ b/nix-darwin/brew.nix @@ -1,25 +1,23 @@ -{...}: { +{...}: + let + browser = ["arc"]; + tools = ["1password" "google-drive" "tailscale"]; + keybind = ["raycast" "karabiner-elements" "aerospace"]; + msoffice = ["microsoft-word" "microsoft-excel" "microsoft-powerpoint"]; + chat = ["discord"]; + dev = ["orbstack" "visual-studio-code@insiders"]; + note = ["notion" "anytype"]; + in +{ homebrew = { enable = true; onActivation = { autoUpdate = true; cleanup = "uninstall"; }; - casks = [ - "1password" - "raycast" - "karabiner-elements" - "arc" - "notion" - "discord" - "microsoft-word" - "microsoft-powerpoint" - "microsoft-excel" - "google-drive" - "orbstack" - "visual-studio-code@insiders" - "tailscale" - "anytype" + casks = browser ++ tools ++ keybind ++ msoffice ++ chat ++ dev ++ note; + taps = [ + "nikitabobko/tap" ]; }; diff --git a/nix-darwin/default.nix b/nix-darwin/default.nix index f61180a..fe8f7b7 100644 --- a/nix-darwin/default.nix +++ b/nix-darwin/default.nix @@ -1,7 +1,7 @@ { pkgs, ... }: { imports = [ - ./system.nix ./brew.nix + ./system.nix ]; nix = { diff --git a/nix-darwin/system.nix b/nix-darwin/system.nix index 667416d..a1ba835 100644 --- a/nix-darwin/system.nix +++ b/nix-darwin/system.nix @@ -10,6 +10,8 @@ InitialKeyRepeat = 11; KeyRepeat = 2; "com.apple.mouse.tapBehavior" = 1; + # Fnキーを押さなくてもF1~F12が使えるように + "com.apple.keyboard.fnState" = true; }; finder = { AppleShowAllFiles = true; @@ -24,8 +26,11 @@ mineffect = "scale"; minimize-to-application = true; wvous-br-corner = 1; + # for Aerospace + Mission Control + expose-group-by-app = true; }; screencapture = { + location = "/Users/alliana/Pictures/screenshot"; disable-shadow = true; }; controlcenter = {