https://github.com/birkhofflee/dotfiles

birkhoff's macOS dotfiles with nix

https://github.com/birkhofflee/dotfiles

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.1%) to scientific vocabulary

Keywords

dotfiles home-manager macos nix nix-darwin zsh
Last synced: 5 months ago · JSON representation

Repository

birkhoff's macOS dotfiles with nix

Basic Info
  • Host: GitHub
  • Owner: BirkhoffLee
  • License: unlicense
  • Language: Shell
  • Default Branch: master
  • Homepage:
  • Size: 3.11 MB
Statistics
  • Stars: 19
  • Watchers: 2
  • Forks: 3
  • Open Issues: 0
  • Releases: 0
Topics
dotfiles home-manager macos nix nix-darwin zsh
Created about 6 years ago · Last pushed 7 months ago
Metadata Files
Readme License Authors

README.md

dotfiles

My macOS dotfiles managed by nix-darwin and home-manager, powered by Nix.

Works on M1 Pro, macOS Sequoia 15.5 (24F74).

Overview

  • nix-darwin sets up the macOS system environment.
    • Nix enables reproducible builds.
  • home-manager manages the user environment, including Homebrew packages.
    • Most GUI apps are managed by Homebrew due to the conflicting nature of Nix and their self-updating capabilities

Key features:

Usage

On a new macOS machine without Nix installed:

```console xcode-select --install

Clone the dotfiles

mkdir $HOME/.config git clone https://github.com/birkhofflee/dotfiles $HOME/.config/nix

Install nix with Determinate Systems installer

Choose "no" to use the upstream nix instead of their own one

curl -fsSL https://install.determinate.systems/nix | sh -s -- install

Source the nix daemon so that the nix command is available immediately

. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh

Build the dotfiles

nix build "$HOME/.config/nix#darwinConfigurations.AlexMBP.system" --extra-experimental-features "nix-command flakes"

Apply the dotfiles

sudo ./result/sw/bin/darwin-rebuild switch --flake "$HOME/.config/nix#AlexMBP"

Optionally, delete the build artifacts

rm -rf ./result ```

After first successful deployment, use the following command to switch:

```console

This only switchs to the latest config

nh darwin switch --hostname AlexMBP "$HOME/.config/nix"

This updates all flake inputs and switches to the latest config

nh darwin switch --update --hostname AlexMBP "$HOME/.config/nix"

This updates one flake input and switches to the latest config

nh darwin switch --update-input --hostname AlexMBP "$HOME/.config/nix" ```

To clean up:

console nh clean all

[!IMPORTANT] The following steps were applicable to installations with the original Nix installer. It is unknown whether they are needed to follow for a Determinate Systems installation.

After a major macOS update:

  1. Upgrade Xcode CLI tools
  2. Uninstall nix: https://nix.dev/manual/nix/2.18/installation/uninstall.html#macos
  3. A system restart may be required
  4. Review CHANGELOG of nix-darwin

```console

Install nix

bash <(curl -L https://nixos.org/nix/install) --daemon --yes --no-modify-profile

Propagate /run

printf 'run\tprivate/var/run\n' | sudo tee -a /etc/synthetic.conf /System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -t

Fix certs (the uninstallation of nix breaks a symbolic link)

https://github.com/NixOS/nix/issues/2899#issuecomment-1669501326

https://discourse.nixos.org/t/ssl-ca-cert-error-on-macos/31171/1

sudo rm /etc/ssl/certs/ca-certificates.crt sudo ln -s /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt /etc/ssl/certs/ca-certificates.crt

nix build "$HOME/.config/nix#darwinConfigurations.AlexMBP.system" --extra-experimental-features "nix-command flakes"

sudo ./result/sw/bin/darwin-rebuild switch --flake "$HOME/.config/nix#AlexMBP" ```

TODOs

Some other dotfiles worth looking into:

  • https://github.com/malob/nixpkgs
  • https://github.com/ahmedelgabri/dotfiles
  • https://github.com/kornicameister/dotfiles/
  • https://github.com/Aloxaf/dotfiles/tree/master/zsh/.config/zsh
  • https://github.com/paulmillr/dotfiles
  • https://github.com/marlonrichert/zsh-launchpad
  • https://github.com/mashehu/dotfiles/blob/master/zshrc

Some completions setups:

  • https://github.com/finnurtorfa/zsh/blob/master/completion.zsh

Articles

Here are some reads you might find interesting:

License

This project is released under The Unlicense.

Owner

  • Name: birkhoff
  • Login: BirkhoffLee
  • Kind: user
  • Location: Taipei City, Taiwan

backend, SRE, devops, music

GitHub Events

Total
  • Watch event: 5
  • Push event: 55
Last Year
  • Watch event: 5
  • Push event: 55

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 449
  • Total Committers: 1
  • Avg Commits per committer: 449.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 90
  • Committers: 1
  • Avg Commits per committer: 90.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Birkhoff Lee g****t@b****e 449
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

Brewfile homebrew
  • ack *
  • asciinema *
  • atk *
  • automake *
  • autossh *
  • awscli *
  • azure-cli *
  • b2-tools *
  • bash *
  • bat *
  • bfg *
  • binutils *
  • binwalk *
  • bison *
  • blueutil *
  • bramstein/webfonttools/sfnt2woff *
  • bramstein/webfonttools/sfnt2woff-zopfli *
  • caddy,restart_service:true *
  • cairo *
  • carthage *
  • certbot *
  • chezmoi *
  • cifer *
  • cjbassi/ytop/ytop *
  • coreutils *
  • cowsay *
  • create-dmg *
  • ctags *
  • curl *
  • derailed/k9s/k9s *
  • dex2jar *
  • diff-so-fancy *
  • difftastic *
  • dns2tcp *
  • dockutil *
  • entr *
  • exa *
  • fabianishere/personal/pam_reattach *
  • fasd *
  • fd *
  • ffmpeg *
  • flarectl *
  • foremost *
  • freetds *
  • fstrm *
  • gdbm *
  • gdk-pixbuf *
  • gh *
  • ghostscript *
  • git *
  • git-delta *
  • git-lfs *
  • glib *
  • gmp *
  • gnu-sed *
  • gnu-tar *
  • gnupg *
  • gnutls *
  • go *
  • gobject-introspection *
  • gocr *
  • gotop *
  • grep *
  • gsettings-desktop-schemas *
  • gtk+ *
  • gtk+3 *
  • harfbuzz *
  • hashicorp/tap/nomad *
  • hashicorp/tap/packer *
  • hashpump *
  • helm *
  • hey *
  • hopenpgp-tools *
  • hstr *
  • htop *
  • httpie *
  • hub *
  • hugo *
  • hydra *
  • imagemagick *
  • iperf3 *
  • jc *
  • jq *
  • knock *
  • krb5 *
  • kubectx *
  • kustomize *
  • ldns *
  • libass *
  • libffi *
  • libfido2 *
  • libheif *
  • libimagequant *
  • libimobiledevice *
  • libirecovery *
  • libpq *
  • libproxy *
  • libraqm *
  • libsodium *
  • libssh *
  • libyaml *
  • locateme *
  • lolcat *
  • lsd *
  • lua *
  • lux *
  • lynx *
  • m-cli *
  • macvim *
  • magic-wormhole *
  • mas *
  • mitmproxy *
  • mosh *
  • mtr *
  • mysql-client *
  • ncdu *
  • neofetch *
  • netpbm *
  • ninja *
  • nmap *
  • node *
  • noti *
  • nss *
  • numpy *
  • oci-cli *
  • ocrad *
  • opensc *
  • openssh *
  • openssl@1.1 *
  • optipng *
  • osx-cpu-temp *
  • p11-kit *
  • pango *
  • php,restart_service:true *
  • pigz *
  • pillow *
  • pinentry *
  • pinentry-mac *
  • pngcheck *
  • procs *
  • protobuf-c *
  • putty *
  • pv *
  • python@3.10 *
  • python@3.8 *
  • python@3.9 *
  • qt *
  • r *
  • rbenv *
  • reattach-to-user-namespace *
  • redis *
  • rename *
  • rlwrap *
  • ruby *
  • ruby-install *
  • screen *
  • skaffold *
  • sleepwatcher,restart_service:true *
  • slides *
  • socat *
  • sqlmap *
  • srt *
  • ssh-copy-id *
  • sslscan *
  • stress *
  • subversion *
  • tcl-tk *
  • tcpflow *
  • tcping *
  • tcpreplay *
  • tcptrace *
  • tcptraceroute *
  • teamookla/speedtest/speedtest *
  • telnet *
  • terminal-notifier *
  • terraform *
  • terraformer *
  • testssl *
  • the_silver_searcher *
  • tmux *
  • tree *
  • ucspi-tcp *
  • unbound,restart_service:true *
  • vbindiff *
  • velero *
  • viddy *
  • wakeonlan *
  • webp *
  • wget *
  • whatmask *
  • wifi-password *
  • wimlib *
  • wireguard-tools *
  • woff2 *
  • xpdf *
  • yamllint *
  • yarn *
  • ykman *
  • ykpers *
  • youtube-dl *
  • yubico-piv-tool *
  • zopfli *
  • zsh *