nix config for mac and linux. multi-user config shared with natalie and fish
  • Nix 66%
  • JavaScript 27.7%
  • GLSL 3.6%
  • Lua 1.4%
  • Shell 1.3%
Find a file
2026-06-10 10:15:51 -07:00
files/ghostty chore: move autofmt into packages/autofmt 2025-08-19 01:33:36 -07:00
lib feat(natalie): switch back to cosmic 2026-02-12 17:38:40 -08:00
modules feat: random terrifying stuff + a backup systsem 2026-06-09 22:27:46 -07:00
packages feat: random terrifying stuff + a backup systsem 2026-06-09 22:27:46 -07:00
users fix(clover): backup script hang fixes 2026-06-10 10:15:51 -07:00
.gitignore feat: "jj ci" version one 2026-04-08 03:09:16 -07:00
.mailmap chore: rename chloe -> clover, julia -> fish 2025-08-18 00:44:21 -07:00
flake.lock chore: update flake inputs 2026-06-01 13:26:54 -07:00
flake.nix Merge branch 'main' of paperclover.dev:nix/config 2026-06-01 13:27:35 -07:00
nvim feat: more neovim things 2025-08-19 01:01:36 -07:00
readme.md chore: rename chloe -> clover, julia -> fish 2025-08-18 00:44:21 -07:00
switch feat: random terrifying stuff + a backup systsem 2026-06-09 22:27:46 -07:00

nix config

this setup allows natalie, clover, and more to share common configuration between their machines, but also share useful modules between each other.

lib/ # reusable functions
modules/ # reusable modules
    +-- home/    # home program configurations
    +-- macos/   # nix-darwin configurations
    +-- neovim/  # nvf configurations
    +-- nixos/   # linux configurations
    +-- shared/  # shared between nixos-rebuild & darwin-rebuild
users/
    +-- clover/
    |   +-- user.nix               # info about her
    |   +-- configuration.nix      # for all hosts (system)
    |   +-- home.nix               # for all hosts (userspace)
    |   +-- vim.nix                # for neovim
    |   +-- sandwich/
    |   |   +-- configuration.nix  # per host
    |   |   +-- home.nix
    |   +-- paperback/
    |       ...
    +-- natalie/
        +-- user.nix               # info about her
        ...

A new machine can be added by adding a new definition in flake.nix. Note that the user and host configuration.nix and home.nix files are

macOS installation instructions

Install Nix using the upstream Nix (Pick "no" then "yes):

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
  sh -s -- install

While this installs, now is a good time to perform manual setup steps:

  • Setup your SSH keys in ~/.ssh
  • Configure the device hostname in System Settings in
    • About -> Name
    • General -> Sharing -> Local Hostname
  • Make sure you're logged into iCloud / Mac App Store
  • xcode-select --install to make sure Git and other utilities are available.
  • Optional: Disable app verification with sudo spctl --master-disable, then, go to System Settings -> Privacy to allow unsigned apps.

Once Nix is installed, open a new shell and clone the repository:

# Clone via HTTPs
git clone https://git.paperclover.net/clo/config.git
# With SSH Authentication
git clone git@git.paperclover.net:clo/config

The location of the cloned repository must match what is in your user.nix file.

Setup nix-darwin using the switch helper:

./switch

Neovim configuration

By default, neovim is configured to all machines in $PATH. Neovim can be run directly via nix run, which skips needing to build the whole system configuration.

nix run .#nvim-natalie  # run by user
./nvim                  # run based on your username