KISS NixOS configuration based on Flakes & flake-parts (supports macOS too)
Find a file
2022-12-27 15:26:19 -05:00
.vscode vscode: not using makefile anymore 2022-12-18 10:03:57 -05:00
home ad 2022-12-27 10:52:44 -05:00
nix-darwin Isolate common nix into lib.nix 2022-12-03 21:57:30 -05:00
nixos Make it a list; add my new key 2022-12-27 14:48:21 -05:00
secrets users/config.nix 2022-12-27 15:23:16 -05:00
systems hci cli 2022-12-24 21:24:05 -05:00
users users/config.nix 2022-12-27 15:23:16 -05:00
.envrc flake'ify shell.nix 2022-05-08 10:25:46 -04:00
.gitattributes git: make flake.lock as auto-generated 2022-05-08 10:17:29 -04:00
.gitignore add direnv 2022-04-28 14:47:41 -04:00
flake.lock update hci 2022-12-24 21:38:26 -05:00
flake.nix users/config.nix 2022-12-27 15:23:16 -05:00
lib.nix Isolate common nix into lib.nix 2022-12-03 21:57:30 -05:00
README.md readme: update dir layout 2022-12-27 15:26:19 -05:00

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. ↩︎