From 30f85e7ce6a3960fd8bb83ad9a6d2f0182e63c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Barnouin?= Date: Tue, 10 Sep 2024 15:09:18 +0200 Subject: [PATCH] Add doc in README --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 17a9ac3..1b55a70 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,26 @@ # NixOS Hypervisor config NixOS Flake to deploy an hypervisor with microvm capability and microvms config + +Build an image : + +``` +# generate a proxmox VMA file +nixos-generate -f proxmox --flake .#nixos-hypervisor + +# generate a qcow2 file for plain KVM +nixos-generate -f qcow --flake .#nixos-hypervisor +``` + +Rebuild the config for an existing VM : + +``` +# build locally +cd /etc/nixos/ +git clone https://git.le43.eu/tbarnouin/nixos-hypervisor.git +cd nixos-hypervisor +sudo nixos-rebuild switch + +# build remotely +nixos-rebuild --target-host root@ switch --flake .#nixos-hypervisor +```