Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

macOS / Linux / Codespaces compatible dotfiles with 1-line setup script. Tested on Apple Silicon Macs. Supports both zsh and fish. Managed with Chezmoi

License

NotificationsYou must be signed in to change notification settings

narze/dotfiles

Repository files navigation

I don't want to waste time setting up my machines, so I spent years maintaining dotfiles.

Dotfiles are meant to be forked, but mine aren't. These scripts install many things you won't ever use. Feel free to look around and copy some of my script to fit your needs.

Chezmoi

The latest version of my dotfiles are managed withChezmoi. I was usingDotbot &Ansible before.

TODOs

  • Fix Fish shell broken in clean install
  • Add Homebrew install script (run-once)
  • Update this readme
  • Cleanup dotbot
  • Linux / Github Codespaces install scripts
  • Github Codespaces for development
  • Fish
  • Documentation website
  • Instructions to import GPG keys
  • 1password integration

Usage

ASK=1 sh -c"$(curl -fsSL https://raw.githubusercontent.com/narze/dotfiles/master/remote_install.sh) -k -v"

First installation will ask for your name so you can customize a bit, and it will skip the encryped files, since you have to retrieve the GPG private key manually later. RemovingASK=1 will use my names for the machine.

Mostly the script will not run completely on the first go, runchezmoi -k apply again until everything is setup properly.

After the first installation you can always change the variables viaASK=1 chezmoi init or runchezmoi edit-config

To change the data or script,chezmoi cd, edit them, then runchezmoi apply.

Manual tasks (One-time per machine)

  • macOS
    • Run Setapp installer manually after thebrew script is run.
    • Login to App Store before running (If notmas will skip installation and open the App Store for you)
    • Preferences -> Change input source switch to CMD+Space, and Spotlight search to Option+Space
    • Runmackup restore once after iCloud is synced
    • Connect to Tailscale to mount NAS
    • Disable Boom 3D keyboard shortcuts
    • Set enrcyption passwordSETPASS=1 chezmoi init

Features

$ makehelp                           Printcommand listdotfiles                       Update dotfilesapply                          Run chezmoi applymacos                          Run macos script

Installed Applications & Tools

Notes (If you have some time to read)

Zsh + Fish

After the recentdrama with Zinit, I decided to giveFish a try, it is good but I also want to still maintain my Zsh configuration. I migrated the settings tozsh4human which is maintained by the one who made Powerlevel10k. It's 2-3x faster than Zinit as of now.

I'll separate the dotfiles script to install zsh or fish separately to save some space. You can also install both like mine.

Development on Github Codespaces

Open in GitHub Codespaces

  • chezmoi cd (Change directory into~/.local/share/chezmoi)
  • Update config and/or scripts
  • chezmoi apply -k (--keep-going)

Apple Silicon

Here are the list of issues I've found on running the script on M1 Macbooks (Tested on both Macbook Air & Macbook Pro)

  • dotbot/brew fails silently : Now they need XCode to be installed first (via App Store), rather than just XCode CLT Seems to be fixed now

  • Kitty.app installing binaries from Homebrew does get you x86, now you have toBuild from source

    • ghq get -l kovidgoyal/kitty/opt/homebrew/bin/python3 setup.py kitty.app# Needs python3 from brewcp -r kitty.app /Applications/kitty.app# Replace CLIrm /opt/homebrew/bin/kittyln -s$PWD/kitty/launcher/kitty /opt/homebrew/bin/kitty
    • If you want both versions, download the executable and rename it (kitty_x86.app)

  • Docker for Mac : Replace withTech Preview version

  • Some brew/asdf packages cannot be installed on arm64 See "Apple Silicon specific commands"

  • Setup both versions of Homebrew, then use shell script to point to the correctbrew

    # Install both versionsarch -arm64 /bin/bash -c"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"arch -x86_64 /bin/bash -c"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"# .zshrcif ["$(uname -m)"=="arm64" ];then# Use arm64 brew, with fallback to x86 brewif [-f /opt/homebrew/bin/brew ];thenexport PATH="/usr/local/bin${PATH+:$PATH}";eval$(/opt/homebrew/bin/brew shellenv)fielse# Use x86 brew, with fallback to arm64 brewif [-f /usr/local/bin/brew ];thenexport PATH="/opt/homebrew/bin${PATH+:$PATH}";eval$(/usr/local/bin/brew shellenv)fifi
  • Rubygems : Specific bundler config is needed (Seebundle config)

  • Yabai : Cannot use space switch commands (eg.yabai -m space --focus 1) even if SIP is disabled

    Workaround

    Setup native shortcut keys manually and use non-consuming shortcut settings (->) inskhdimage

Apple Silicon specific commands

  • make brew-x86 : Install packages which cannot be instaled witharm64 arch right now (eg.kubectl,kubectx Both are now supported!)

About

macOS / Linux / Codespaces compatible dotfiles with 1-line setup script. Tested on Apple Silicon Macs. Supports both zsh and fish. Managed with Chezmoi

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

    Packages

    No packages published

    Languages


    [8]ページ先頭

    ©2009-2025 Movatter.jp