18 lines
898 B
Markdown
18 lines
898 B
Markdown
|
## NixOS System flakes
|
||
|
|
||
|
This is currently in heavy development. The goal is to create a reusable structure for Freelock infrastructure, to make recreating a host or building a new one a breeze.
|
||
|
|
||
|
## Creating a new host
|
||
|
|
||
|
Start with a bare NixOS install, sort out the hardware-specific needs (partitioning scheme - /boot, swap, /nix partitions, etc).
|
||
|
|
||
|
1. Clone this repository.
|
||
|
2. Create a directory under hosts for the host, based on the hostname.
|
||
|
3. Copy the hardware-configuration.nix into the new directory.
|
||
|
4. Copy a default.nix from a similar host into the new directory.
|
||
|
5. Edit to include the appropriate modules and any host-specific settings.
|
||
|
6. Add a stanza in the top-level flake.nix for the new host.
|
||
|
7. Commit changes and push to central repo.
|
||
|
8. Delete /etc/nixos and move this directory into place (for servers at least -- can symlink if user-managed).
|
||
|
9. `sudo nixos-rebuild switch`.
|