move local setup back to dotfiles
change
commit 0651b20badc8d5004052217549c7c5906283011f
author Alpha Chen <alpha@kejadlen.dev>
date
parent 20ca2b2c
diff --git a/local/Brewfile b/local/Brewfile
deleted file mode 100644
index e1e57d8..0000000
--- a/local/Brewfile
+++ /dev/null
@@ -1,115 +0,0 @@
-tap "kejadlen/tap", "https://git.kejadlen.dev/alpha/homebrew-tap.git"
-
-tap "homebrew/bundle"
-tap "homebrew/command-not-found"
-tap "homebrew/services"
-
-brew "aider"
-brew "ansible"
-brew "bat"
-brew "chruby"
-brew "curl"
-brew "difftastic"
-brew "direnv"
-brew "docker"
-brew "entr"
-brew "eza"
-brew "fd"
-brew "fzf"
-brew "git"
-brew "git-lfs"
-brew "hyperfine"
-brew "jj"
-brew "luarocks"
-brew "mas"
-brew "minizinc"
-brew "pandoc"
-brew "restic"
-brew "ripgrep"
-brew "ruby-install"
-brew "syncthing", restart_service: :changed
-brew "terraform"
-brew "tmux"
-brew "ykman"
-brew "yt-dlp"
-brew "z3"
-brew "zoxide"
-brew "zsh"
-
-## editor things
-
-brew "ansible-language-server"
-brew "ansible-lint"
-brew "efm-langserver"
-brew "fnlfmt"
-brew "shellcheck"
-brew "terraform-ls"
-brew "yaml-language-server"
-brew "yamlfmt"
-brew "yamllint"
-
-# install from head
-
-brew "tree-sitter", args: ["HEAD"] # install this before neovim
-brew "neovim", args: ["HEAD"]
-brew "universal-ctags", args: ["HEAD"]
-
-# install from taps
-
-brew "fabianishere/personal/pam_reattach"
-brew "felixkratz/formulae/sketchybar"
-brew "kejadlen/tap/fennel-ls", args: ["HEAD"]
-
-cask "font-sauce-code-pro-nerd-font"
-cask "font-source-code-pro"
-cask "font-symbols-only-nerd-font"
-
-cask "1password"
-cask "1password-cli"
-cask "acorn"
-cask "aerospace"
-cask "affinity-designer@1"
-cask "alfred"
-cask "anki"
-cask "anytype"
-cask "arq"
-cask "autodesk-fusion"
-cask "calibre"
-cask "cleanshot"
-cask "daisydisk"
-cask "discord"
-cask "fantastical"
-cask "firefox@developer-edition"
-cask "ghostty"
-cask "hammerspoon"
-cask "keyboardcleantool"
-cask "kicad"
-cask "mailmate"
-cask "neovide"
-cask "obsidian"
-cask "orbstack"
-cask "prusaslicer"
-cask "qlmarkdown"
-cask "qlstephen"
-cask "quicklook-csv"
-cask "quicklook-json"
-cask "sf-symbols"
-cask "signal"
-cask "slack"
-cask "soulver"
-cask "tailscale"
-cask "telegram"
-cask "topnotch"
-cask "vlc"
-cask "yubico-yubikey-manager"
-cask "vmware-fusion"
-cask "zoom"
-cask "zotero"
-
-# TODO Don't assume shared Apple accounts
-# mas "1Password for Safari", id: 1569813296
-# mas "GoodNotes", id: 1444383602
-# mas "Little Snitch Mini", id: 1629008763
-# mas "PDF Viewer", id: 1120099014
-# mas "Shareful", id: 1522267256
-# mas "Xcode", id: 497799835
diff --git a/local/defaults.yml b/local/defaults.yml
deleted file mode 100644
index 829b267..0000000
--- a/local/defaults.yml
+++ /dev/null
@@ -1,292 +0,0 @@
-- name: Update macOS defaults
-  tags: defaults
-  hosts: macos
-  tasks:
-
-  - name: Set OS X defaults
-    osx_defaults:
-      domain: "{{ item.domain | default(omit) }}"
-      key: "{{ item.key }}"
-      type: "{{ item.type }}"
-      value: "{{ item.value }}"
-    notify: Restart OS X system services
-    vars:
-      mailmate:
-        allowed_image_regexps:
-          - (i|images|d)\.gr-assets\.com
-          - www\.goodreads\.com
-          - massdrop-s3\.imgix\.net
-          - .*\.cloudfront\.net
-          - s3\.amazonaws\.com
-          - files\.convertkitcdn\.com/assets/pictures
-          - wizardzines\.com
-    with_items:
-
-      # NSGlobalDomain defaults
-      - # don't quit idle applications
-        domain: -g
-        key: NSDisableAutomaticTermination
-        type: bool
-        value: true
-      - # disable font smoothing
-        key: AppleFontSmoothing
-        type: int
-        value: 0
-      - # full keyboard access
-        key: AppleKeyboardUIMode
-        type: int
-        value: 3
-      - # show all extensions by default
-        key: AppleShowAllExtensions
-        type: bool
-        value: true
-      - # keyboard repeat rate
-        key: KeyRepeat
-        type: int
-        value: 2
-      - # delay before keyboard repeat
-        key: InitialKeyRepeat
-        type: int
-        value: 25
-      - # set sidebar item size to small
-        key: NSTableViewDefaultSizeMode
-        type: int
-        value: 1
-      - # disable resume
-        key: NSQuitAlwaysKeepsWindows
-        type: bool
-        value: false
-      - # add debug menu in web views
-        key: WebKitDeveloperExtras
-        type: bool
-        value: true
-      - # tap to click
-        key: com.apple.mouse.tapBehavior
-        type: bool
-        value: true
-      - # only show scrollbars when scrolling
-        key: AppleShowScrollBars
-        type: string
-        value: WhenScrolling
-      - # move windows by holding ctrl+cmd and dragging any part of the window
-        domain: -g
-        key: NSWindowShouldDragOnGesture
-        type: bool
-        value: true
-
-      # Safari
-      - # enable Debug menu in Safari
-        domain: com.apple.Safari
-        key: IncludeInternalDebugMenu
-        type: bool
-        value: true
-      - # disable Java
-        domain: com.apple.Safari
-        key: com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabled
-        type: bool
-        value: false
-      - # disable Java
-        domain: com.apple.Safari
-        key: com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabledForLocalFiles
-        type: bool
-        value: false
-
-      - # disable dashboard
-        domain: com.apple.dashboard
-        key: mcx-disabled
-        type: bool
-        value: true
-
-      - # don't write .DS_Store to network volumes
-        domain: com.apple.desktopservices
-        key: DSDontWriteNetworkStores
-        type: bool
-        value: true
-
-      # Dock defaults
-      - # automatically hide and show the dock
-        domain: com.apple.dock
-        key: autohide
-        type: bool
-        value: true
-      - # minimize windows using the scale effect
-        domain: com.apple.dock
-        key: mineffect
-        type: string
-        value: scale
-      - # don't rearrange spaces
-        domain: com.apple.dock
-        key: mru-spaces
-        type: bool
-        value: false
-      - domain: com.apple.dock
-        key: orientation
-        type: string
-        value: left
-      - # set the bottom left hot corner to sleep the display
-        domain: com.apple.dock
-        key: wvous-bl-corner
-        type: int
-        value: 10
-      - # set the icon size to 36 pixels
-        domain: com.apple.dock
-        key: tilesize
-        type: int
-        value: 36
-      - # no dock delay
-        domain: com.apple.dock
-        key: autohide-delay
-        type: float
-        value: 0
-      - # show hidden apps
-        domain: com.apple.dock
-        key: showhidden
-        type: bool
-        value: true
-
-      - # https://nikitabobko.github.io/AeroSpace/guide#a-note-on-displays-have-separate-spaces
-        # disable "displays have separate spaces"
-        domain: com.apple.spaces
-        key: spans-displays
-        type: bool
-        value: true
-
-      # Trackpad settings
-      - domain: com.apple.driver.AppleBluetoothMultitouch.trackpad
-        key: Clicking
-        type: int
-        value: 1
-      - domain: com.apple.driver.AppleBluetoothMultitouch.trackpad
-        key: TrackpadFourFingerVertSwipeGesture
-        type: int
-        value: 0
-      - domain: com.apple.driver.AppleBluetoothMultitouch.trackpad
-        key: TrackpadThreeFingerDrag
-        type: bool
-        value: true
-      - domain: com.apple.driver.AppleBluetoothMultitouch.trackpad
-        key: TrackpadThreeFingerHorizSwipeGesture
-        type: int
-        value: 0
-      - domain: com.apple.driver.AppleBluetoothMultitouch.trackpad
-        key: TrackpadThreeFingerVertSwipeGesture
-        type: int
-        value: 0
-
-      # Finder defaults
-      - # don't ask when changing file extension
-        domain: com.apple.finder
-        key: FXEnableExtensionChangeWarning
-        type: bool
-        value: false
-      - # default to list view
-        domain: com.apple.finder
-        key: FXPreferredViewStyle
-        type: string
-        value: Nlsv
-      - # enable text selection in QuickLook
-        domain: com.apple.finder
-        key: QLEnableTextSelection
-        type: bool
-        value: true
-      - # show full path in Finder
-        domain: com.apple.finder
-        key: _FXShowPosixPathInTitle
-        type: bool
-        value: true
-      - # remove the proxy icon hover delay
-        domain: com.apple.Finder
-        key: NSToolbarTitleViewRolloverDelay
-        type: float
-        value: 0
-      - # show the proxy icon and older titlebar
-        # https://twitter.com/chucker/status/1395843084383043584
-        domain: com.apple.Finder
-        key: NSWindowSupportsAutomaticInlineTitle
-        type: bool
-        value: false
-      - # show the proxy icon always
-        domain: com.apple.universalaccess
-        key: showWindowTitlebarIcons
-        type: bool
-        value: true
-
-      - # set date format in menubar
-        domain: com.apple.menuextra.clock
-        key: DateFormat
-        type: string
-        value: h:mm
-
-      - # no window shadows when capturing windows
-        domain: com.apple.screencapture
-        key: disable-shadow
-        type: bool
-        value: true
-
-      - domain: com.apple.screencapture
-        key: location
-        type: string
-        value: "{{ ansible_env.HOME }}/Downloads"
-
-      - domain: com.apple.screensaver
-        key: askForPassword
-        type: int
-        value: 1
-
-      - domain: com.apple.Terminal
-        key: ShowLineMarks
-        type: bool
-        value: false
-
-      # Other applications
-      - domain: com.google.Chrome
-        key: AppleEnableSwipeNavigateWithScrolls
-        type: bool
-        value: false
-
-      - domain: org.vim.MacVim
-        key: MMLastWindowClosedBehavior
-        type: int
-        value: 2
-
-      - domain: org.vim.MacVim
-        key: MMUntitledWindow
-        type: int
-        value: 1
-
-      - domain: org.vim.MacVim
-        key: SUCheckAtStartup
-        type: int
-        value: 1
-
-      - domain: org.vim.MacVim
-        key: SUEnableAutomaticChecks
-        type: int
-        value: 1
-
-      - domain: com.freron.MailMate
-        key: MmAllowedImageURLRegexp
-        type: string
-        value: "https://({{ mailmate.allowed_image_regexps | join('|') }})"
-
-      - domain: com.freron.MailMate
-        key: MmSendMessageDelayEnabled
-        type: bool
-        value: true
-
-      - domain: com.freron.MailMate
-        key: MmSendMessageDelay
-        type: int
-        value: 60
-
-  handlers:
-
-  - name: Restart OS X system services
-    ansible.builtin.shell: pgrep {{ item }} > /dev/null && killall {{ item }}
-    with_items:
-      - Finder
-      - Dock
-      - SystemUIServer
-    ignore_errors: true
-
-# vim: ft=yaml.ansible
diff --git a/local/macos.yml b/local/macos.yml
index 4c7185d..3cc4162 100644
--- a/local/macos.yml
+++ b/local/macos.yml
@@ -1,37 +1,3 @@
-- tags: brew
-  hosts: macos
-  tasks:
-    - name: Homebrew bundle
-      ansible.builtin.command: brew bundle --file=~/src/boxen/local/Brewfile
-
-- tags: jujutsu
-  hosts: macos
-  tasks:
-    - name: Register Jujutsu config location
-      ansible.builtin.command: jj config path --user
-      register: jj_config_path_user
-      changed_when: false
-
-    - name: Make sure Jujutsu config dir exists
-      ansible.builtin.file:
-        dest: "{{ path | dirname }}"
-        state: directory
-        mode: "0700"
-      vars:
-        path: "{{ jj_config_path_user.stdout }}"
-
-    - name: Symlink Jujutsu config
-      ansible.builtin.file:
-        src: ~/.config/jj/config.toml
-        dest: "{{ dest }}"
-        state: link
-      vars:
-        dest: "{{ jj_config_path_user.stdout }}"
-
-  # TODO Initialize ~/src/boxen to use jj
-
-- import_playbook: defaults.yml
-
 - tags: dock
   hosts: macos
   tasks:
diff --git a/local/main.yml b/local/main.yml
deleted file mode 100644
index 4fc1e38..0000000
--- a/local/main.yml
+++ /dev/null
@@ -1,71 +0,0 @@
-- hosts: local
-  tasks:
-    - name: Check out dotfiles
-      ansible.builtin.git:
-        repo: https://git.kejadlen.dev/alpha/dotfiles.git
-        dest: ~/.dotfiles
-        version: main
-        accept_newhostkey: true
-      # this repo often has local changes
-      ignore_errors: true # noqa: ignore-errors
-
-    - name: Symlink shallow dotfiles
-      ansible.builtin.file:
-        src: ~/.dotfiles/{{ item }}
-        dest: ~/{{ item }}
-        state: link
-      loop:
-        - .config
-        - .digrc
-        - .gemrc
-        - .gitconfig
-        - .hammerspoon
-        - .inputrc
-        - .local
-        - .p10k.zsh
-        - .profile
-        - .ruby-version
-        - .tmux.conf
-        - .zsh
-        - .zshenv
-        - .zshrc
-
-    - name: Symlink deep dotfiles
-      vars:
-        dotfiles:
-          - .bundle/config
-          - .cargo/config.toml
-          - .docker/config.json
-      block:
-        - name: Ensure directory exists
-          ansible.builtin.file:
-            dest: ~/{{ item | dirname }}
-            state: directory
-            mode: "0755"
-          loop: "{{ dotfiles }}"
-        - name: Symlink dotfile
-          ansible.builtin.file:
-            src: ~/.dotfiles/{{ item }}
-            dest: ~/{{ item }}
-            state: link
-          loop: "{{ dotfiles }}"
-
-- import_playbook: macos.yml
-
-# Misc things that can (or need to) wait on the above to run
-- hosts: local
-  tasks:
-
-    # https://tratt.net/laurie/blog/2024/faster_shell_startup_with_shell_switching.html
-    - name: Set default shell to sh
-      ansible.builtin.user:
-        name: alpha
-        shell: /bin/sh --login
-
-    # needs to go after luarocks is installed
-    - name: Install fennel
-      ansible.builtin.command: luarocks install fennel
-      args:
-        creates: /opt/homebrew/bin/fennel
-
-# vim: ft=yaml.ansible