Skip to content

Instantly share code, notes, and snippets.

@kiprasdak
kiprasdak / README.md
Created January 11, 2024 09:07 — forked from gdamjan/README.md
Install a NixOS for a systemd-nspawn container … from podman

Install

Run a nix container with podman, with the container destination mounted as /mnt:

DEST=~/containers/nixos
mkdir -p $DEST/{dev,proc,etc/nixos}

podman run -v $DEST:/mnt -it --rm --cap-add SYS_ADMIN docker.io/nixos/nix:latest
@kiprasdak
kiprasdak / raw_img_gpt_efi.md
Created January 11, 2024 12:25 — forked from Dids/raw_img_gpt_efi.md
Working with raw disk images with GPT + EFI partition in linux

What is the purpose of this guide?

I originally wanted to create bootable disks for UEFI (i)PXE booting, meaning I could directly boot premade disk images over the network, no matter what they may contain.

While this guide serves my purpose well, it's also generic enough to be extended to almost any use case. For example, you might use it as temporary or even portable storage, mountable across different operating systems, or you might use it as a disk image for a virtual machine.

DISCLAIMER: Be very careful with the commands listed below, as you could potentially not only cause data loss, but even prevent your operating system from booting, no matter how unlikely either of those may be. Pay attention to the commands, comments and differences between the guide and your local environment.