Skip to content

rucas/derpfiles

Repository files navigation

derpfiles

Some hidden files that keep me sane...

Table of Contents

Install

OS X System

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 -- install

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

clone repo

$ git clone https://github.com/rucas/derpfiles.git

optionally, 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

FAQ

How do I update a flake input?

$ nix flake lock --update-input <INPUT>

How do I update a nixpkgs in home.packages declared in home-manager and not as a flake?

$ nix flake lock --update-input nixpkgs

How do I open the current terminal line in my editor in Normal mode (zsh-vi-mode)?

In Normal mode you can type vv to edit current command line in an editor

Contribute

PRs accepted. Checkout CONTRIBUTING.md

License

MIT © Lucas Rondenet