Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

szinn/nix-config

Repository files navigation

nix-config - My Nix Configuration

This is not actively used for all my machines. I've moved back to Chezmoi as a dotfile manager.

See the full documentation at szinn.github.io/nix-config.

I manage my personal machines using Nix and Home-Manager.

The machines consist of:

Machine System Purpose
hera x86_64-linux Intel NUC for running NixOS bare metal
titan x86_64-linux Intel NUC for running NixOS bare metal
macvm (not active) aarch64-darwin Nix-Darwin VM running in Parallels on MacBook
nixvm (not active) aarch64-linux NixOS VM running in Parallels on MacBook
odin (not active) aarch64-darwin Main MacBook Pro laptop
ragnar (not active) x86_64-linux NAS server

Bootstrapping MacOS Machines

Darwin machines can be bootstrapped from the nix-config repository directly.

bash -c "$(curl -LsS https://raw.githubusercontent.com/szinn/nix-config/main/bootstrap.sh)"

At this point, NIX should be installed. Restart the shell.

To bootstrap the configuration now, run

nix run --extra-experimental-features nix-command --extra-experimental-features flakes nix-darwin -- switch --flake .#$(hostname -s)

There might be a few files in /etc that need renaming to complete the installation.

sudo mv /etc/nix/nix.conf /etc/nix.conf.before-nix-darwin
sudo mv /etc/shells /etc/shells.before-nix-darwin
sudo mv /etc/zshenv /etc/zshenv.before-nix-darwin

Afterwards, if the configuration is touched, darwin-rebuild is required to run the updates.

git add . ; darwin-rebuild switch --flake .#$(hostname -s)

I have MacOS aliases dupb (darwin update build) to do a build only and show what changes. dup (darwin update) does the build and an install.

Bootstrapping NixOS Machines

The process for bootstrapping a NixOS machine is essentially following the VM process

About

My Nix-based Dotfiles for Mac

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •