Skip to content

Installation

Marchyo ships two installer images and four declarative disk layouts. Both are flake outputs, so they track the same nixpkgs as the rest of Marchyo.

Output Contents
packages.x86_64-linux.iso-minimal Text installer with SSH (key-only), disko, LUKS and btrfs tools
packages.x86_64-linux.iso-graphical GNOME live session with Calamares, GParted and a browser

Build one and write it to a USB stick:

Terminal window
nix build github:Jylhis/marchyo#iso-minimal # or #iso-graphical
sudo dd if=result/iso/*.iso of=/dev/sdX bs=4M status=progress conv=fsync

From a checkout, just iso minimal or just iso graphical does the same build.

Layout Disks What you get
simple-uefi device ESP, 8 GB swap, ext4 root
btrfs device ESP, btrfs subvolumes (/, /home, /nix, /persist, /var/log, /.snapshots), encrypted swap
luks-btrfs device As btrfs, inside LUKS2 (passphrase prompt at boot)
luks-btrfs-raid1 deviceA, deviceB Two LUKS2 members holding one btrfs RAID1 filesystem

marchyo.lib.diskoLayouts lists the names. Use stable device paths (/dev/disk/by-id/...) so a reordered bus cannot point a layout at the wrong disk.

Import nixosModules.disko (disko’s module, so your flake needs no disko input) and the layout, called with your disk:

nixosConfigurations.myhost = marchyo.lib.mkNixosSystem {
system = "x86_64-linux";
modules = [
marchyo.nixosModules.disko
(marchyo.lib.diskoLayout "luks-btrfs" {
device = "/dev/disk/by-id/nvme-Samsung_SSD_980_PRO_1TB_XXXX";
})
./configuration.nix
];
};

The layout defines fileSystems and swap, so leave those out of hardware-configuration.nix (generate it with nixos-generate-config --no-filesystems).

From the installer, with your flake checked out:

Terminal window
# Destroys everything on the layout's disks.
sudo nix run github:nix-community/disko -- --mode destroy,format,mount --flake .#myhost
sudo nixos-install --flake .#myhost

disko reads the layout from nixosConfigurations.myhost, so the disks you partition are the ones your system will mount.