summaryrefslogtreecommitdiff
path: root/machines/doretta/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'machines/doretta/default.nix')
-rw-r--r--machines/doretta/default.nix104
1 files changed, 74 insertions, 30 deletions
diff --git a/machines/doretta/default.nix b/machines/doretta/default.nix
index 057777e..f504f18 100644
--- a/machines/doretta/default.nix
+++ b/machines/doretta/default.nix
@@ -34,44 +34,88 @@
};
programs.virt-manager.enable = true;
- microvm.vms = {
- foolcreek = {
- config = {
- microvm.shares = [{
- source = "/nix/store";
- mountPoint = "/nix/.ro-store";
- tag = "ro-store";
- proto = "virtiofs";
- }];
+ microvm = {
+ vms = {
+ foolcreek = {
+ config = {
+ microvm.shares = [{
+ source = "/nix/store";
+ mountPoint = "/nix/.ro-store";
+ tag = "ro-store";
+ proto = "virtiofs";
+ }];
+ };
};
};
+ # interfaces = [{
+ # type = "tap";
+ # id = "vm-foolcreek";
+ # mac = "02:00:00:00:00:01";
+ # }];
};
systemd.network = {
enable = true;
- networks = {
- "10-lan" = {
- matchConfig.Name = ["eno1" "vm-*"];
- networkConfig = {
- Bridge = "br0";
- };
- };
- "10-lan-bridge" = {
- matchConfig.Name = "br0";
- networkConfig = {
- Address = ["10.1.11.100/24"];
- Gateway = ["10.1.11.254"];
- DNS = ["8.8.8.8"];
- # IPv6AcceptRA = true;
- };
- linkConfig.RequiredForOnline = "routable";
- };
- };
- netdevs."vr0" = {
+
+ netdevs."10-microvm" = {
netdevConfig = {
- Name = "br0";
+ Name = "microvm";
Kind = "bridge";
};
};
+ networks = {
+ "10-microvm" = {
+ matchConfig.Name = "microvm";
+ networkConfig = {
+ DHCPServer = true;
+ # IPv6SendRA = true;
+ };
+ addresses = [ {
+ Address = "10.0.0.1/24"; # } {
+ # Address = "fd12:3456:789a::1/64";
+ } ];
+ # ipv6Prefixes = [{ Prefix = "fd12:3456:789a::/64"; }];
+ # ipv6PREF64Prefixes = [{ Prefix = "fd12:3456:789a::/64"; }];
+ };
+ "11-microvm" = {
+ matchConfig.Name = "vm-*";
+ # Attach to the bridge that was configured above
+ networkConfig.Bridge = "microvm";
+ };
+ };
+
+ # "20-lan" = {
+ # matchConfig.Type = "ether";
+ # networkConfig = {
+ # Address = ["10.1.11.101/24" "2001:db8::b/64"];
+ # Gateway = "10.1.11.254";
+ # DNS = ["8.8.8.8"];
+ # IPv6AcceptRA = true;
+ # DHCP = "no";
+ # };
+ # };
+ # "10-lan" = {
+ # matchConfig.Name = ["eno1" "vm-*"];
+ # networkConfig = {
+ # Bridge = "br0";
+ # };
+ # };
+ # "10-lan-bridge" = {
+ # matchConfig.Name = "br0";
+ # networkConfig = {
+ # Address = ["10.1.11.100/24" "2001:db8::a/64"];
+ # Gateway = ["10.1.11.254"];
+ # DNS = ["8.8.8.8"];
+ # IPv6AcceptRA = true;
+ # };
+ # linkConfig.RequiredForOnline = "routable";
+ # };
+ # };
+ # netdevs."br0" = {
+ # netdevConfig = {
+ # Name = "br0";
+ # Kind = "bridge";
+ # };
+ # };
};
# Set your time zone.
@@ -118,7 +162,7 @@
};
# Open ports in the firewall.
- # networking.firewall.allowedTCPPorts = [ ... ];
+ networking.firewall.allowedTCPPorts = [ 67 8080 2222 ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;