Some hidden files that keep me sane...
Install nix via DeterminateSystems/nix-installer. This has flakes enabled by default.
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix
| sh -s -- installinstall 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 $PATHmkdirs in ~
$ mkdir ~/Code
$ mkdir ~/Workclone repo
$ git clone https://github.com/rucas/derpfiles.gitoptionally, add a github token to bypass 429 rate limits from Github
vi ~/.config/nix/nix.conf
access-tokens = github.com=******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
Enter the dev shell (just, nixd, statix, deadnix, plus the pre-commit hooks):
$ nix developCommon tasks are wrapped in a justfile — run just to list them:
$ just build [HOST] # build a host without activating (defaults to `hostname -s`)
$ just switch [HOST] # build and activate
$ just check # nix flake check (statix, deadnix, treefmt, host evals)
$ just fmt # format the tree with treefmt
$ just update [INPUT] # update all flake inputs, or just one$ nix flake update <INPUT> # or: just update <INPUT>$ nix flake update nixpkgsIn Normal mode you can type vv to edit current command line in an editor
There's weird error somewhere in nix-darwin that doesn't load the launch the plists
$ launchctl unload ~/Library/LaunchAgents/org.nixos.jankyborders.plist
$ launchctl load ~/Library/LaunchAgents/org.nixos.jankyborders.plist
$ launchctl unload ~/Library/LaunchAgents/org.nixos.skhd.plist
...PRs accepted. Checkout CONTRIBUTING.md
MIT © Lucas Rondenet
