https://github.com/soikr/microvm-examples
Simple examples for microvm.nix - Reflecting my knowledge
https://github.com/soikr/microvm-examples
example examples microvm microvms nix nixos
Last synced: 6 months ago
JSON representation
Simple examples for microvm.nix - Reflecting my knowledge
- Host: GitHub
- URL: https://github.com/soikr/microvm-examples
- Owner: Soikr
- Created: 2024-12-01T21:48:23.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-23T23:39:04.000Z (about 1 year ago)
- Last Synced: 2025-03-30T15:12:26.506Z (10 months ago)
- Topics: example, examples, microvm, microvms, nix, nixos
- Language: Nix
- Homepage: https://github.com/astro/microvm.nix
- Size: 11.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# microvm-examples
Extremely simple examples for [microvm](https://github.com/astro/microvm.nix), easily appliable to your configs
I only started playing around with microvms the day before making this repo, so im no expert.
> [!WARNING]
> This is a simplified snippet of my current homelab.
>
> Most vm configs can be safely applied, host configurations are in ./nixos
## Rebuilding
Rebuilding is as easy as `sudo nixos-rebuild switch --flake .#Avalanche`
> [!NOTE]
> This will apply the changes to the microvms as well since i implemented [declarative deployment](https://astro.github.io/microvm.nix/declarative.html#declarative-deployment)
## Updating VMs
Did you change some vm configuration? When rebuilding the host (#Avalanche) it may say the microvms didnt restart.
Restarting the microvms requires `sudo microvm -Ru (microvm name)`
>For example, you can restart the Minecraft microvm after tweaking its configs and rebuilding the host with:
`sudo microvm -Ru Minecraft`
## To do
1. Extra services like wireguard
2. Minecraft vm better managed imperatively
>Make a few notes on imperative configuration
>
>Remove declarative deployment for minecraft
>
>Better minecraft example to better reflect a real configuration
3. Configuration cleanup
4. Additional removal info
5. Eventually programmed networking alternative
## Extra
Not sure why but removal of microvms is iffy. These may help:
>https://github.com/astro/microvm.nix/issues/181
>
>[removing-microvms](https://astro.github.io/microvm.nix/microvm-command.html#removing-microvms)
## Useful links:
https://astro.github.io/microvm.nix/
https://github.com/astro/microvm.nix
You can message me on discord: soikr