1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

feat: refactor and integrate wireguard module into microvm module

This commit is contained in:
oddlama 2023-05-19 21:10:16 +02:00
parent e5f3ffd288
commit 78cdcd3c69
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
10 changed files with 385 additions and 256 deletions

View file

@ -3,7 +3,6 @@
inputs,
lib,
nixos-hardware,
nodeSecrets,
pkgs,
...
}: {
@ -26,20 +25,18 @@
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" "r8169"];
extra.microvms = let
macOffset = config.lib.net.mac.addPrivate nodeSecrets.networking.interfaces.lan.mac;
in {
test = {
extra.microvms = {
vms.test = {
id = 11;
host = "test.local";
system = "x86_64-linux";
autostart = true;
zfs = {
enable = true;
pool = "rpool";
dataset = "safe/vms/test";
mountpoint = "/persist/vms/test";
};
autostart = true;
mac = macOffset "00:00:00:00:00:11";
macvtap = "lan";
system = "x86_64-linux";
};
};
@ -99,10 +96,4 @@
# };
# };
#};
#microvm.vms.agag = {
# flake = self;
# updateFlake = microvm;
#};
#microvm.autostart = ["guest"];
}