Poby's nix-darwin setup
Find a file
Poby fb3f35e153
refactor(darwin): import via ./hosts
rename modules/ -> hosts/
2026-03-16 22:01:29 +09:00
.codex/skills/readme feat(codex): add readme codex skill 2026-03-15 02:50:31 +09:00
home feat(aerospace): multi monitor config 2026-03-16 21:54:13 +09:00
hosts refactor(darwin): import via ./hosts 2026-03-16 22:01:29 +09:00
secrets feat: add github_cli_token as sops secret 2026-03-15 02:50:21 +09:00
.gitignore feat(git): git signing with ssh 2026-03-15 02:50:35 +09:00
.sops.yaml feat: sops-nix configuration 2026-03-15 02:50:19 +09:00
AGENTS.md feat: add AGENTS.md 2026-03-15 02:50:28 +09:00
flake.lock feat: sops-nix configuration 2026-03-15 02:50:19 +09:00
flake.nix refactor(darwin): import via ./hosts 2026-03-16 22:01:29 +09:00
Justfile feat: add AGENTS.md 2026-03-15 02:50:28 +09:00
README-ko.md docs(readme): add korean readme 2026-03-15 03:00:30 +09:00
README.md docs(readme): add korean readme 2026-03-15 03:00:30 +09:00

nix-darwin

한국어

Declarative macOS setup for host fenrir using nix-darwin, home-manager, nix-homebrew, and sops-nix.

What This Repo Manages

  • System-level macOS configuration (modules/)
  • User-level tooling and shell/editor setup (home/)
  • Declarative Homebrew taps/apps/casks
  • Encrypted secrets via SOPS (secrets/ + .sops.yaml)

Prerequisites

  • macOS on Apple Silicon (aarch64-darwin)
  • Nix with flakes (nix-command + flakes)
  • just (command runner)
  • SOPS age key at:
~/.config/sops/age/keys.txt

Repository Layout

  • flake.nix: flake inputs/outputs and darwinConfigurations
  • Justfile: daily commands (darwin, darwin-debug, fmt, up, gc, etc.)
  • modules/: system modules (nix-core.nix, system.nix, apps.nix, host-users.nix)
  • home/: Home Manager modules (shell, git, nvf, terminal, tools)
  • secrets/: encrypted secret files (poby.yaml)

Common Commands

# List available tasks
just

# Build and switch for a host
just darwin $(hostname)

# Build and switch with full trace
just darwin-debug $(hostname)

# Format Nix files (example: whole repo)
just fmt .

# Update all flake inputs
just up

# Update one input
just upp nixpkgs-darwin

# Inspect system profile history
just history

# Clean old generations / garbage collect
just clean
just gc

Secrets

  • Secrets are encrypted in secrets/*.yaml.
  • .sops.yaml enforces age-based encryption rules.
  • Home Manager reads secrets from secrets/poby.yaml and exposes:
    • github_ssh_key
    • github_cli_token

Customization Notes

  • Update hostname, username, and useremail in flake.nix for your machine.
  • Add new system behavior in modules/*.nix.
  • Add user tooling in home/*.nix and import it from home/default.nix.

Troubleshooting

  • Use just darwin-debug <hostname> for verbose evaluation/build output.
  • If a build succeeds but behavior is stale, re-run switch and verify active host/config values.