nix-darwin config. shared with natalie
Find a file
chloe caruso 6cb28f1a2d feat: nix keybind system, delete snacks, add lazygit/fzf
i've had issues with snacks' file tree, to the point where the delete
operation would corrupt my editor state. the worst of which being a bug
that caused my entire project to get deleted when pressing 'd' on a
directory with corrupt state[1]. it's unacceptable, and i no longer
trust any of the 'snacks.nvim' project.

the neotree plugin is much nicer in my opinion, and what's great about
it is there is a easy command list by pressing '?' on the file view.

the big part of this commit is introducing 'vim.keybinds' (not to be
confused with the existing 'keymaps' array). we now have a centralized
system for defining keyboard shortcuts. in theory, user configs can
override my default keymap, but i think the current users will
appreciate these default settings. theres a handful of built-in keybinds
for activating the newly added fzf-lua plugin (replaces telescope and
snacks' pickers, losing no functionality).

as one bonus treat, leader g g for integrated lazygit!

[1]:
af60d1172f
2025-08-18 00:25:32 -07:00
files feat: "autofmt" code formatter 2025-08-17 20:43:47 -07:00
lib feat: "autofmt" code formatter 2025-08-17 20:43:47 -07:00
modules feat: nix keybind system, delete snacks, add lazygit/fzf 2025-08-18 00:25:32 -07:00
packages feat: "autofmt" code formatter 2025-08-17 20:43:47 -07:00
users feat: "autofmt" code formatter 2025-08-17 20:43:47 -07:00
.gitignore i am a meower and i forgot what i did 2025-07-05 17:08:16 -07:00
.mailmap chore: add mailmap file 2025-08-17 21:37:26 -07:00
flake.lock add expo dev deps 2025-08-11 22:29:50 -07:00
flake.nix feat: "autofmt" code formatter 2025-08-17 20:43:47 -07:00
nvim we stop redirecting to 2 2025-07-05 21:13:42 -07:00
readme.md feat: "autofmt" code formatter 2025-08-17 20:43:47 -07:00
switch fixing things 2025-07-05 20:33:02 -07:00

nix config

this setup allows natalie and chloe 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/
    +-- chloe/
    |   +-- 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