diff --git a/README.md b/README.md index c30c24d..bcb2e9c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,57 @@ -Install a system via nixos-anywhere +# NixOS Configuration + +A modular NixOS configuration setup for multiple systems. + +## Project Structure + +- `modules/`: Reusable NixOS/Darwin modules + - `common.nix`: Common module imports and definitions + - `nixos/`: NixOS-specific modules + - `home/`: Home Manager integration for NixOS + - `nix/`: Nix package manager configuration + - `nix-ld/`: Dynamic linking support + - `network/`: Network configuration modules + - `resolved/`: DNS resolution configuration + - `security/`: Security-related modules + - `ssh-host-keys/`: SSH host key management + - `services/`: Service configuration modules + - `base/`: Basic system configuration + - `gui/`: Graphical interface setup + - `homeprinter/`: Home printer support + - `podman/`: Container runtime + - `secureboot/`: Secure boot configuration + - `sgx/`: Intel SGX support + - `aesmd_dcap/`: SGX AESMD DCAP service + - `pccs/`: SGX Provisioning Certificate Caching Service + - `system/`: System configuration modules + - `auto-upgrade/`: Automatic system upgrades + - `limits/`: System resource limits + - `zram/`: ZRAM swap configuration + - `tools/`: Common tools configuration + - `direnv/`: Direnv integration + - `git/`: Git configuration + - `user/`: User account configuration + - `virtualization/`: Virtualization support + - `home/`: Home Manager modules + - `cli-apps/`: Command-line applications + - `gui/`: GUI application configuration + - `tools/`: User tools configuration + - `user/`: User preferences + - `darwin/`: Darwin-specific modules + - `home/`, `nix/`, `security/`, etc. +- `systems/`: Individual system configurations + - `x86_64-linux/`: Linux systems on x86_64 + - `aarch64-linux/`: Linux systems on ARM + - `x86_64-darwin/`: macOS systems on x86_64 + - `aarch64-darwin/`: macOS systems on ARM +- `homes/`: Home Manager configurations for each user/system +- `lib/`: Helper functions and utilities +- `overlays/`: Nixpkgs overlays +- `packages/`: Custom packages + +## Using the Configurations + +### Install a system via nixos-anywhere ```bash $ nix run github:numtide/nixos-anywhere -- \ @@ -8,22 +61,21 @@ $ nix run github:numtide/nixos-anywhere -- \ $ ssh -t root@hostname systemd-cryptenroll /dev/luksdev --wipe-slot=tpm2 --tpm2-device=auto --tpm2-pcrs=1,15 ``` -nixos-rebuild remote git flake +### Update NixOS system ```bash $ nixos-rebuild --use-remote-sudo -L --show-trace --refresh --flake git+https://git.hoyer.xyz/harald/nixcfg boot ``` -on darwin + +### Update macOS system ```bash $ darwin-rebuild -L --show-trace --refresh --flake git+https://git.hoyer.xyz/harald/nixcfg switch ``` - -home-manager remote git flake +### Update home-manager configuration ```bash $ nix --refresh run 'git+https://git.hoyer.xyz/harald/nixcfg' -- \ switch -b backup --flake 'git+https://git.hoyer.xyz/harald/nixcfg' ``` -