Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nix-config

My personal Nix configuration powered by Den.

Onboarding

[!NOTE] NOTE

This onboarding guide assumes you are on macOS.

Use the official experimental Nix Installer to get Nix if you don't have it.

$ curl -sSfL https://artifacts.nixos.org/nix-installer | sh -s -- install --enable-flakes

Make a temporary Nix shell containing Git, NH, and an editor of your choice. I use Helix with Nil for Nix syntax highlighting.

$ nix-shell -p git helix nil nh

Then, prepare your Nix flake directory as such.

sudo mkdir -p /etc/nix-darwin
sudo chown $(id -nu):$(id -ng) /etc/nix-darwin
cd /etc/nix-darwin

Now clone this repo directly into /etc/nix-darwin, NOT /etc/nix-darwin/nix-config (notice the . at the end). Make a fresh Git repo for yourself.

git clone https://github.com/jacobranson/nix-config.git .
rm -rf .git
git init .

Make whatever changes you need, at a minimum replacing my username and hostname with your own. My defaults should give you everything you need out of the box. Be sure to make your own Git repo instead of pushing to mine.

rm -rf .git
git init .

When done, apply the changes.

nh darwin switch .#replace-me-with-your-hostname

You'll no longer need to rely on that temporary Nix shell. Also, from now on, you can simply do nh darwin switch with no arguments, since /etc/nix-darwin is the default directory for a Nix flake on macOS.

About

My personal Nix configuration powered by Den.

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages