Some hidden files that keep me sane...
install nix multi-user mode
$ sh <(curl -L https://nixos.org/nix/install) --daemon
install homebrew
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# make sure to follow steps at end to add brew to $PATH
mkdirs in ~
$ mkdir ~/Code
$ mkdir ~/Work
$ mkdir -p ~/Documents/notes/gtd ~/Documents/notes/home ~/Documents/notes/work
clone repo
$ git clone https://github.com/rucas/derpfiles.git
enable flakes
mkdir -p ~/.config/nix
cat >> ~/.config/nix/nix.conf <<EOL
experimental-features = nix-command flakes
EOL
optionally, add a github token to bypass 429 rate limits from Github
vi ~/.config/nix/nix.conf
access-tokens = github.com=******
reload the nix-daemon
$ launchctl remove org.nixos.nix-daemon
$ launchctl load /Library/LaunchDaemons/org.nixos.nix-daemon.plist'
# may get warning about using bootstrap instead...
start nix build
$ nix build --impure '.#darwinConfigurations.[HOSTNAME].system'
let nix-darwin take the wheel...
$ ./result/sw/bin/darwin-rebuild switch --flake '.#[HOSTNAME]' --impure
# you may get an error on first run...
# follow the instructions...
#
# error: Directory /run does not exist, aborting activation
# Create a symlink to /var/run with:
# ...
may get error about /etc/nix/nix.conf
already exists. To fix:
$ sudo mv /etc/nix/nix.conf /etc/nix/nix.conf.bak
$ nix flake lock --update-input <INPUT>
$ nix flake lock --update-input nixpkgs
In Normal mode you can type vv
to edit current command line in an editor
PRs accepted. Checkout CONTRIBUTING.md
MIT © Lucas Rondenet