Skip to content
nixypandaPublic

About

My dotfiles + system configuration for NixOS and mac

Resources

Stars

176 stars

Watchers

2 watching

Forks

Latest commit

 

History

954 Commits

Folders and files

Repository files navigation

dotfiles

Nix flake-based dotfiles for my Mac and home server.

Current Setup

Area Current setup
Mac host srt-l03-shire
Home server srt-n01-rivendell
User config Home Manager
macOS system config nix-darwin
NixOS server config NixOS flake output with Home Manager and nixarr
Terminal emulator Kitty plus kitty-dev
Shell Nushell in Kitty
Server login shell Bash, with Nushell installed for interactive use
Font Hack Nerd Font Mono
Editor Neovim
Browser Firefox via Home Manager, Google Chrome via Mac GUI packages
Home server services Jellyfin, Radarr, Prowlarr, qBittorrent, Seerr, and Pi-hole

The main flake outputs are:

  • homeConfigurations.srt-l03-shire
  • darwinConfigurations.srt-l03-shire
  • nixosConfigurations.srt-n01-rivendell

Well these look different from normal dotfiles mate

Ok so I am one of those people who are all in on the "nix hype train". That is why this might look unfamiliar to someone who does not know what nix is.

Nix is a philosophy, a programming language, a package manager and an OS. All this culminates in a unique approach to package management and system configuration. The end result is reproducible, declarative and reliable systems.

Think of it like git but for your system, package management, etc. :mind_blown:

Color me interested! Where can I know more?

Now if you are still with me and want to know more about it. Here are a few helpful links that you can visit to know more about it.

  • Watch first 6 minutes of this video to get a gist of nix package management and how it's different from standard package management and then building on that what is NixOS)
  • If the previous video peeks your curiosity then I recommend looking at this to get a deeper understanding
  • Finally, if you decide that this is something you want for yourself. Then this brilliant playlist might just be the perfect place to start.

Setup

These commands assume the repo lives at ~/.dotfiles.

Mac user config

Requirements:

  • nix with flake support is available

Apply the Home Manager config:

cd ~/.dotfiles
home-manager switch --flake "./#srt-l03-shire" -b backup

The Home Manager config also installs an apply-user helper that runs the same switch from ~/.dotfiles.

Mac system config

Apply the nix-darwin config:

sudo darwin-rebuild switch --flake ~/.dotfiles/.#srt-l03-shire

The Home Manager config also installs an apply-darwin helper for this.

Home server config

The NixOS server flake output is nixosConfigurations.srt-n01-rivendell. The host config lives under hosts/srt-n01-rivendell/.

The normal remote switch from the Mac builds and deploys over Tailscale:

env NIX_SSHOPTS='-i /Users/nixypanda/.ssh/github-key -o StrictHostKeyChecking=accept-new' \
  nix run nixpkgs#nixos-rebuild -- switch \
  --flake .#srt-n01-rivendell \
  --build-host nixypanda@100.127.3.54 \
  --target-host nixypanda@100.127.3.54 \
  --no-reexec \
  --use-substitutes \
  --ask-sudo-password

On the server itself, the equivalent is:

sudo nixos-rebuild switch --flake ~/.dotfiles#srt-n01-rivendell

Updating inputs

cd ~/.dotfiles
nix flake update --flake .

The Home Manager config also installs an update-flake helper for this.

Validation

See AGENTS.md → "Tests / Validation" for the evaluation and build checks.

Caveat

Rivendell homelab secrets under services/secrets/ are encrypted with agenix. If you plan to use these dotfiles, replace those files with your own secrets or remove the references from the codebase.

Code Structure

  • flake.nix wires the Mac Home Manager output, Mac nix-darwin output, and the NixOS home server output.
  • Reusable user/program modules live under modules/home/; shared system modules live under modules/system/.
  • NixOS service modules live under services/.
  • Per-host configuration lives under hosts/<host>/.
  • Neovim Lua config lives under modules/home/nvim/lua/.
  • Homelab service docs live in services/README.md.

About

My dotfiles + system configuration for NixOS and mac

Resources

Stars

176 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages