Skip to content

Instantly share code, notes, and snippets.

@damienpontifex
Last active February 7, 2026 22:05
Show Gist options
  • Select an option

  • Save damienpontifex/fbc0ba5607236863d993158c90eef4e6 to your computer and use it in GitHub Desktop.

Select an option

Save damienpontifex/fbc0ba5607236863d993158c90eef4e6 to your computer and use it in GitHub Desktop.
{
# sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount --yes-wipe-all-disks ./disk-config.nix
# nixos-install --flake github:damienpontifex/nixos-homelab?ref=main#homeserver
disko.devices = {
disk = {
main = {
device = "/dev/sda"; # Change to your actual disk (e.g., /dev/nvme0n1)
type = "disk";
content = {
type = "gpt";
partitions = {
# 512MiB boot partition at the start
ESP = {
size = "512M";
type = "EF00"; # EFI System Partition type
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ]; # Standard security options
};
};
# Root partition filling the middle
nixos = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment