Skip to content

Initial installation

A DNF network is set up step by step, and you can stop at any stage: a single workstation is enough to get started.

  1. A workstation : the administrator’s machine (this page).
  2. A gateway : create a zone and connect other machines to it.
  3. Coordination : connect zones via VPN (tailnet).

The project starts from the dnf-boilerplate template: a ready-made structure and a commented etc/config.yaml to fill in.

  1. Create the repository

    From the dnf-boilerplate 🡕 template (“Use this template” button), or by cloning.

  2. Bootstrap the framework

    Fenêtre de terminal
    nix run github:darkone-linux/darkone-nixos-framework#init
    nix develop github:darkone-linux/darkone-nixos-framework
  3. Initialize secrets

    Fenêtre de terminal
    just configure-admin-host

Everything is declared in etc/config.yaml (network, zones, users, hosts). For a first workstation, one user and one host are enough:

etc/config.yaml
users:
alice:
uid: 1000
name: "Alice"
profile: "nix-admin"
groups: ["global"]
hosts:
- hostname: "poste"
name: "Poste de l'administrateur"
profile: "desktop"
users: ["alice"]
disko:
profile: "btrfs-1-disk"
devices:
main: "/dev/nvme0n1"

Then regenerate and verify:

Fenêtre de terminal
just generate # produces var/generated/*.nix from etc/config.yaml
just check-flake # nix flake check

The installation burns an image, boots the machine from it, then applies the complete system.

  1. Generate the image

    Fenêtre de terminal
    just build-iso
  2. Boot the machine

    Burn the image to a USB drive, connect the computer to the network, boot from the drive, then note its IP address.

  3. Apply the system

    Fenêtre de terminal
    # just full-install <host> <user> <ip>
    just full-install poste nix 10.0.0.50
  4. Reboot without the drive.