nixos-config/README.md
2022-12-27 15:26:19 -05:00

2.1 KiB

This repository contains the Nix / NixOS configuration for all of my systems. Start from flakes.nix (see Flakes).

To build,

# First, edit nixosConfigurations in flake.nix to add your system's hostname.
# And then change `userName` to your username.
nix run

Install notes

Directory layout

  • home: home-manager config (shared between Linux and macOS)
  • nixos: nixos modules for Linux
  • nix-darwin: nix-darwin modules for macOS
  • users: user information
  • secrets: agenix secrets (encrypted using ssh keys)
  • systems: top-level configuration.nix('ish) for various systems

Tips

  • To update NixOS (and other inputs) run nix flake update
    • You may also update a subset of inputs, e.g.
      nix flake lock --update-input nixpkgs --update-input darwin --update-input home-manager
      
  • To free up disk space,
    sudo nix-env -p /nix/var/nix/profiles/system --delete-generations +2
    sudo nixos-rebuild boot
    
  • To autoformat the project tree using nixpkgs-fmt, run nix fmt.

  1. You might have to rm -rf /etc/nix/nix.conf, so our flake.nix can do its thing. ↩︎