NixOS · LUKS2 · btrfs · impermanence

A clean slate.
Every boot.

Ephemeral Nix installs an opinionated NixOS desktop on an encrypted btrfs disk and wipes the root filesystem on every boot. Your home folder and a short list of declared paths live on /persist; everything else comes back from the config.

x86_64 · UEFI · erases the whole disk · read first

nixuser@nixosthe wipe test
sudo touch /ephemeral-test  # outside what’s keptecho hello > ~/notes.txt  # in /home, keptsystemctl rebootreboot · / is recreated from root-blankls /ephemeral-testls: cannot access '/ephemeral-test': No such file or directorycat ~/notes.txthello
A file written to / is gone after a reboot; one in your home folder is still there. From the installer's README.
The Ephemeral Nix wallpaper: a neon NixOS snowflake breaking up into pixels above the words EPHEMERAL NIX.
assets/wallpaper.svgThe default wallpaper and user picture of every install, and where this site takes its colours from.

01Principles

The ideas behind it.

ephemeral

System state starts clean.

/ is recreated from an empty snapshot on every boot. Whatever a program left outside the kept paths is gone by the next login.

declarative

The machine is a flake.

A short flake.nix pins a tested release of the config, and settings.json holds your answers. The lock file pins everything else, so the same release builds the same system. Each feature is one module file.

hardened

Hardened, within reason.

Full-disk encryption, a closed firewall, OpenSnitch asking before programs connect out (on the full profile), kernel hardening and sandboxed services, without turning the desktop into a chore. The security page lists what each one doesn't cover, too.

02How it works

What happens between the passphrase and the login screen.

  1. unlock

    systemd-boot loads the kernel from /boot. You type the passphrase and the LUKS2 volume opens.

  2. reset

    The rollback unit deletes the root subvolume and snapshots root-blank in its place.

  3. mount

    /nix, /persist and /var/log are mounted, and kept paths are bound from /persist into place.

  4. check

    root-reset-check confirms the reset happened on this boot. If it didn't, ephemeral-doctor says so and how to fix it.

The full architecture

03Persistence

An ephemeral root, not ephemeral data.

Your files are kept. What's wiped is everything else on /: the state programs scatter across /etc and /var that nobody asked to keep.

Gone at every boot

  • files written to / outside the kept list
  • an edit made by hand in /etc
  • a database in /var/lib nobody declared
  • /tmp, which is a tmpfs

Kept on /persist

  • /home, all of it
  • Wi-Fi connections, Bluetooth pairings
  • the machine id, SSH host key, login password hash
  • what each enabled feature declares
modules/keep.nix
{
  flake.modules.nixos.pc.environment.persistence."/persist" = {
    directories = [ "/var/lib/postgresql" ];
    files = [ "/etc/machine-info" ];
  };
}

To keep something else, add a module like this one and run ephemeral-update. ephemeral-doctor kept lists everything a machine keeps.

How persistence works

04Security

Locked down by default, with known gaps.

  • LUKS2 with argon2id over the whole system, swap included
  • Firewall on, SSH off, no port open without a setting
  • OpenSnitch denies outbound connections you haven't allowed (full profile)
  • Kernel hardening, IOMMU on, unprivileged BPF off
  • Root has no password; sudo and the Nix daemon are for wheel only
  • The config's own root services run in a systemd sandbox
  • No Secure Boot; /boot is not encrypted
  • Passphrase only, no TPM unlock
  • The IOMMU only guards against DMA once the kernel is running
Security overview and threat model

05Configuration

Two repositories, one pinned release.

ephemeral-nixos is the installer and nothing else. ephemeral-nixos-config holds every module a machine gets, organized with the dendritic pattern: each file is one feature, loaded automatically, adding to a few shared modules.

Your machine's flake in /persist/etc/nixos is four lines. It pins a release; nothing builds from a branch.

/persist/etc/nixos/flake.nix
{
  inputs.ephemeral.url = "github:the-wittch/ephemeral-nixos-config/v4.2.0";
  outputs = inputs: inputs.ephemeral.lib.mkFlake { inherit inputs; root = ./.; };
}
Architecture and the dendritic modules

06Installation

One question per screen, and a review before anything is written.

  1. 01Download the ISO and check it against SHA256SUMS and its attestation.
  2. 02Turn off Secure Boot, boot the stick in UEFI mode.
  3. 03Answer the screens: disk, desktop, keyboard, user, passphrase, profile, apps.
  4. 04Type the disk's name to confirm. The installer erases it and installs.
Install guide

08Status

Maintained by one person, released every week.

RepositoryLatestReleasedCadence
ephemeral-nixos-configv4.2.02026-11-13Patch release each Monday with the newest nixpkgs, after the boot tests pass
ephemeral-nixosv3.7.72026-11-13Each Tuesday it moves to the newest config release once the install test passes; installs config v4.2.0

Tracks nixos-unstable, and moves to the stable 26.11 channel once it's released. Releases are immutable. See the changelog and the roadmap.