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.
The journey
Section titled “The journey”- A workstation : the administrator’s machine (this page).
- A gateway : create a zone and connect other machines to it (
darkone add gateway). - Servers and services : files, photos, messaging… see the service catalog.
- Internet : link the zones together with a VPN (tailnet).
Prerequisites
Section titled “Prerequisites”| Item | Required |
|---|---|
| Machine | x86_64, UEFI recommended |
| Secure Boot | disabled |
| Disk | 20 GB minimum |
| Memory | 6 GB (threshold: 5500 MiB) |
| USB drives | two: installer and backup |
| Network | Internet, ≈ 5 GB downloaded |
Disk encryption requires UEFI. The memory check reads MemTotal :
a 6 GB machine passes, a 4 GB one is rejected. The installer and the installation
live in memory : with 4 GB, the machine saturates and the installation does not complete.
Prepare the key
Section titled “Prepare the key”-
Download
The ISO and its checksum, attached to each framework release 🡕 :
dnf-installer-vX.Y.Z-x86_64-linux.isoand its.sha256. -
Verify the checksum
In the folder containing both files :
Fenêtre de terminal sha256sum -c dnf-installer-vX.Y.Z-x86_64-linux.iso.sha256Expected :
dnf-installer-vX.Y.Z-x86_64-linux.iso: OK. -
Burn the key
Locate the key with
lsblk, then write the image to it :Fenêtre de terminal sudo dd if=dnf-installer-vX.Y.Z-x86_64-linux.iso of=/dev/sdX bs=4M status=progress conv=fsync
Guided installation
Section titled “Guided installation”The first workstation installs on its own, from the generic ISO, with no other
machine : it is the simplest path. The darkone new assistant is displayed
in English.
-
Boot the machine from the key, preferably with a wired connection.
Without a cable, the console waits for the network, and
Enteropensnmtuito choose a Wi-Fi. Once the network is up, a menu offers three choices (type the number, thenEnter) :Choice Effect 1) New network runs darkone new(this page)2) Add this machine to an existing network displays a pairing code, see Gateway and Add a machine 3) Shell command prompt -
Answer the assistant
Choose 1. Before the first question, the assistant checks the memory, the network and the clock ; on failure, Check again, Connect to Wi-Fi or Abort. From the command prompt (
Ctrl-Cor choice 3), it starts again :Fenêtre de terminal darkone newIt asks for the language and keyboard, the administrator’s identity and password, the network domain (
home.arpaif you have no domain of your own), the machine name, the disk if there are several (no smaller than 20 GB : the backup key is never offered), disk encryption, then the disk passphrase. The rest is detected : laptop or desktop, UEFI or BIOS, country time zone. Unencrypted disk : one passphrase for backing up the keys.The disk passphrase becomes the fleet passphrase (
luks-passphrase) : any encrypted host installed afterwards is formatted with it. See Disk encryption (LUKS). -
Confirm
The summary points out the final choices (domain, login, zone). The disk is then wiped and the system installed, the project included in
/etc/nixos. -
Back up the keys, to a second USB key
Plug in a USB key (FAT, exFAT, ext4…), select it : nothing on it is erased. The assistant writes
dnf-backup-<domain>.tar.ageto it, then asks you to unplug and plug it back in to read it again. With no key available (a VM) : Skip for now, at your own risk, thenjust backup-admin <device>from the installed system. -
Reboot, with the USB keys removed.
The assistant asks Remove the installation USB key. Reboot now? (no by default). Encrypted disk : the passphrase is requested at every boot, with the chosen keyboard. The first session opens a welcome page in the browser : step 1 of 4 completed, the gateway next (reopened later, it marks step 2 done as soon as the gateway is installed). It stays within reach in the Local network folder of the applications (First steps), along with the documentation (DNF Doc) and a terminal in the
/etc/nixosproject (Network sources), whoseREADME.mdsummarizes everyday use.
What if the installation fails?
Section titled “What if the installation fails?”nixos-installis restarted on its own, 3 attempts (attempt N/3) ; the store already copied is kept.- Beyond that, Retry? [y/N] at a terminal, otherwise the failure is reported.
Ctrl-Cstops without a new attempt, and returns control.- Restart
darkone newin the same ISO session : Previous install. - Resume : same answers, project and disk kept, nothing erased.
- Start from scratch : project deleted, disk erased after the summary.
- Abort : nothing changes.
The answers live in RAM ($XDG_RUNTIME_DIR/dnf-answers.yaml), the
passphrases never : Resume asks for them again. If resuming is impossible,
the wizard says why (It cannot be resumed) and offers only the rest.
If the ISO is rebooted, the project is lost : start from scratch.
No cable, Wi-Fi?
Section titled “No cable, Wi-Fi?”At boot, Enter opens nmtui ; from the command prompt,
nmtui does the same. A check that fails also offers Connect to Wi-Fi.
A captive portal blocks the installation : sign in there first.
Installing in a VM?
Section titled “Installing in a VM?”On a Linux with Nix and KVM, a single command boots the ISO in a QEMU window, virtual disk included :
nix run github:darkone-linux/darkone-nixos-framework#tryThe disk is kept from one run to the next (~/.local/share/dnf-try) ;
nix run …#try -- --reset starts from scratch. A VM has no USB key for the
backup : Skip for now, then just backup-admin once installed.
Installing by script?
Section titled “Installing by script?”An answers file takes the place of the questions ; a missing answer is
requested, or refused with --non-interactive.
version: 1admin: login: "alice" name: "Alice Martin" passwordHash: '$y$j9T$...' # mkpasswd -m yescryptnetwork: domain: "example.org"host: hostname: "poste"disk: encrypt: truelocale: language: "fr_FR.UTF-8"backup: device: "/dev/disk/by-label/SECOURS" # clé USB de la sauvegardedarkone new --answers reponses.yaml --non-interactive --yes \ --luks-passphrase-file /run/user/1000/luksThe disk passphrase never goes into the answers file, which
gets passed around : --luks-passphrase-file reads it from a file, otherwise it is
requested. It also encrypts the backup ; for an unencrypted disk, it is
--backup-passphrase-file. In scripted mode, the USB key is read back without being
unplugged.
--resume: resumes the interrupted installation of the session (with--non-interactive).--dry-run: displays the plan without touching anything, on any machine.- Serial console : no menu, run
darkone newmanually. - Package cache, in addition to cache.nixos.org :
--cache <url>,DNF_CACHEorcache.url.
What does the backup contain?
Section titled “What does the backup contain?”dnf-backup-<domain>.tar.age, encrypted with age, on the key’s file
system, with its dnf-backup-<domain>.README.txt in plain text :
nix/: the deployment key (SSH) and the admin age key derived from it ;infra.key: the infra age key ;project.bundle: the project,/etc/nixos, as agit bundle.
To open it, on any Linux with age :
age -d dnf-backup-example.org.tar.age | tar -xgit clone dnf-backup/project.bundle mon-reseauOn a new administration workstation, the keys take their place again, under
the nix account, in mode 600 : /home/nix/.ssh/id_ed25519,
/home/nix/.config/sops/age/keys.txt and /etc/sops/age/infra.key. The project
evolves : just backup-admin <device> redoes the backup, keeping
the old one renamed with its date
(recipes).
Why a backup reminder?
Section titled “Why a backup reminder?”As long as /var/lib/dnf/backup-admin is missing, the home page of the first
session shows a banner : the keys are not backed up. This
marker (date and commit) is written by just backup-admin once the key is
complete ; backup skipped or failed, it stays absent.
Which zone, which prefix?
Section titled “Which zone, which prefix?”The network is born with a main zone, with prefix 10.0 (10.0.0.0/16) if it is
free, otherwise the first free one (10.x, 172.16 to 172.31, 192.168). The
summary indicates it, and the choice is final.