summaryrefslogtreecommitdiff
path: root/hosts/minime
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/minime')
-rw-r--r--hosts/minime/hardware-configuration.nix6
-rw-r--r--hosts/minime/networking/default.nix3
-rw-r--r--hosts/minime/networking/uvm.nix32
-rw-r--r--hosts/minime/uvm.nix10
4 files changed, 47 insertions, 4 deletions
diff --git a/hosts/minime/hardware-configuration.nix b/hosts/minime/hardware-configuration.nix
index 7e17821..ae2a528 100644
--- a/hosts/minime/hardware-configuration.nix
+++ b/hosts/minime/hardware-configuration.nix
@@ -65,6 +65,12 @@
options = [ "zfsutil" ];
};
+ fileSystems."/var/lib/microvms" = {
+ device = "zpool/data/var/lib/microvms";
+ fsType = "zfs";
+ options = [ "zfsutil" ];
+ };
+
swapDevices = [
{
device = "/dev/disk/by-partuuid/7e7d0e0b-90b7-465c-a022-089b38e0f16d";
diff --git a/hosts/minime/networking/default.nix b/hosts/minime/networking/default.nix
index b1c044f..25e20b3 100644
--- a/hosts/minime/networking/default.nix
+++ b/hosts/minime/networking/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
imports = [
./uplink.nix
./uvm.nix
diff --git a/hosts/minime/networking/uvm.nix b/hosts/minime/networking/uvm.nix
index 15e498e..dfcb14c 100644
--- a/hosts/minime/networking/uvm.nix
+++ b/hosts/minime/networking/uvm.nix
@@ -1,8 +1,10 @@
-{ ... }: {
+{ ... }:
+{
+ # TODO: make a module
systemd.network = {
netdevs."10-uvm-br" = {
netdevConfig = {
- Kind = bridge;
+ Kind = "bridge";
Name = "uvm-br";
};
};
@@ -13,7 +15,31 @@
DHCPServer = false;
IPv6SendRA = true;
};
- Address = [ ];
+ addresses = [
+ {
+ Address = "10.99.99.1/24";
+ }
+ {
+ Address = "fd12:3456:789a::1/64";
+ }
+ ];
+ ipv6Prefixes = [
+ {
+ Prefix = "fd12:3456:789a::/64";
+ }
+ ];
};
+
+ networks."11-uvm-br" = {
+ matchConfig.Name = "uvm-*";
+ networkConfig.Bridge = "uvm-br";
+ };
+
+ };
+ networking.nat = {
+ enable = true;
+ enableIPv6 = true;
+ externalInterface = "enp90s0";
+ internalInterfaces = [ "uvm-br" ];
};
}
diff --git a/hosts/minime/uvm.nix b/hosts/minime/uvm.nix
new file mode 100644
index 0000000..7f10579
--- /dev/null
+++ b/hosts/minime/uvm.nix
@@ -0,0 +1,10 @@
+{ inputs, ... }:
+{
+ microvm.stateDir = "/var/lib/microvms";
+ microvm.vms = {
+ authentik = {
+ flake = inputs.self;
+ updateFlake = "github:gshipunov/nix-config/master";
+ };
+ };
+}