diff options
| -rw-r--r-- | flake.lock | 78 | ||||
| -rw-r--r-- | machines/doretta/default.nix | 104 | ||||
| -rw-r--r-- | machines/vm/foolcreek/default.nix | 17 |
3 files changed, 126 insertions, 73 deletions
@@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1743265529, - "narHash": "sha256-QbjP15/2N+VJl0b5jxrrTc+VOt39aU4XrDvtP0Lz5ik=", + "lastModified": 1745357003, + "narHash": "sha256-jYwzQkv1r7HN/4qrAuKp+NR4YYNp2xDrOX5O9YVqkWo=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "1d2dbd72c2bbaceab031c592d4810f744741d203", + "rev": "a19cf76ee1a15c1c12083fa372747ce46387289f", "type": "github" }, "original": { @@ -262,11 +262,11 @@ ] }, "locked": { - "lastModified": 1743387206, - "narHash": "sha256-24N3NAuZZbYqZ39NgToZgHUw6M7xHrtrAm18kv0+2Wo=", + "lastModified": 1746171682, + "narHash": "sha256-EyXUNSa+H+YvGVuQJP1nZskXAowxKYp79RNUsNdQTj4=", "owner": "nix-community", "repo": "home-manager", - "rev": "15c5f9d04fabd176f30286c8f52bbdb2c853a146", + "rev": "50eee705bbdbac942074a8c120e8194185633675", "type": "github" }, "original": { @@ -292,11 +292,11 @@ ] }, "locked": { - "lastModified": 1742215578, - "narHash": "sha256-zfs71PXVVPEe56WEyNi2TJQPs0wabU4WAlq0XV7GcdE=", + "lastModified": 1745948457, + "narHash": "sha256-lzTV10FJTCGNtMdgW5YAhCAqezeAzKOd/97HbQK8GTU=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "2fd36421c21aa87e2fe3bee11067540ae612f719", + "rev": "ac903e80b33ba6a88df83d02232483d99f327573", "type": "github" }, "original": { @@ -321,11 +321,11 @@ ] }, "locked": { - "lastModified": 1739049071, - "narHash": "sha256-3+7TpXMrbsUXSwgr5VAKAnmkzMb6JO+Rvc9XRb5NMg4=", + "lastModified": 1745015490, + "narHash": "sha256-apEJ9zoSzmslhJ2vOKFcXTMZLUFYzh1ghfB6Rbw3Low=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "175c6b29b6ff82100539e7c4363a35a02c74dd73", + "rev": "60754910946b4e2dc1377b967b7156cb989c5873", "type": "github" }, "original": { @@ -352,11 +352,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1743703735, - "narHash": "sha256-xcxT/1X0quzovhfLkz9UL8nt4QGnoi8uNHGUl26x2eQ=", + "lastModified": 1746141377, + "narHash": "sha256-7Vgy4KoCwuSflfq2nRgnm7sq/b4zV1dXa9J3fF1gm1g=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "ff97d18c4c61ae14f8f3b80178e6b72c8a4b7901", + "rev": "6f174a9e0892aab5c4c17a7da9be7f92bcdcebec", "type": "github" }, "original": { @@ -377,11 +377,11 @@ ] }, "locked": { - "lastModified": 1743549251, - "narHash": "sha256-yf+AXt0RkAkCyF6iSnJt6EJAnNG/l6qv70CVzhRP6Bg=", + "lastModified": 1743714874, + "narHash": "sha256-yt8F7NhMFCFHUHy/lNjH/pjZyIDFNk52Q4tivQ31WFo=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "4ab17ccac08456cb5e00e8bd323de2efd30612be", + "rev": "3a5c2bda1c1a4e55cc1330c782547695a93f05b2", "type": "github" }, "original": { @@ -445,11 +445,11 @@ ] }, "locked": { - "lastModified": 1739048983, - "narHash": "sha256-REhTcXq4qs3B3cCDtLlYDz0GZvmsBSh947Ub6pQWGTQ=", + "lastModified": 1745951494, + "narHash": "sha256-2dModE32doiyQMmd6EDAQeZnz+5LOs6KXyE0qX76WIg=", "owner": "hyprwm", "repo": "hyprland-qtutils", - "rev": "3504a293c8f8db4127cb0f7cfc1a318ffb4316f8", + "rev": "4be1d324faf8d6e82c2be9f8510d299984dfdd2e", "type": "github" }, "original": { @@ -474,11 +474,11 @@ ] }, "locked": { - "lastModified": 1741191527, - "narHash": "sha256-kM+11Nch47Xwfgtw2EpRitJuORy4miwoMuRi5tyMBDY=", + "lastModified": 1745357019, + "narHash": "sha256-q/C3qj9FWHQenObXuw/nGIT8iIsWFjgmcQYcA+ZfpPs=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "72df3861f1197e41b078faa3e38eedd60e00018d", + "rev": "397600c42b8d7a443a5b4e92aa15f46650a90f18", "type": "github" }, "original": { @@ -499,11 +499,11 @@ ] }, "locked": { - "lastModified": 1742984269, - "narHash": "sha256-uz9FaCIbga/gQ5ZG1Hb4HVVjTWT1qjjCAFlCXiaefxg=", + "lastModified": 1745975815, + "narHash": "sha256-s3GzsRxBL/N/xYgUXZhQh4t62uR1BN4zxXgWBtJ3lWM=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "7248194a2ce0106ae647b70d0526a96dc9d6ad60", + "rev": "05878d9470c9e5cbc8807813f9ec2006627a0ca0", "type": "github" }, "original": { @@ -581,11 +581,11 @@ "spectrum": "spectrum" }, "locked": { - "lastModified": 1743083165, - "narHash": "sha256-Fz7AiCJWtoWZ2guJwO3B1h3RuJxYWaCzFIqY0Kmkyrs=", + "lastModified": 1745262696, + "narHash": "sha256-hbk/u7Tyl7PUw+e9fa2Vk3VKchy7zovEAjichIoZvTM=", "owner": "astro", "repo": "microvm.nix", - "rev": "773d5a04e2e10ca7b412270dea11276a496e1b61", + "rev": "ae53cb29425c3077d7b088bec5d2bd9275594db3", "type": "github" }, "original": { @@ -651,11 +651,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1743703532, - "narHash": "sha256-s1KLDALEeqy+ttrvqV3jx9mBZEvmthQErTVOAzbjHZs=", + "lastModified": 1746055187, + "narHash": "sha256-3dqArYSMP9hM7Qpy5YWhnSjiqniSaT2uc5h2Po7tmg0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "bdb91860de2f719b57eef819b5617762f7120c70", + "rev": "3e362ce63e16b9572d8c2297c04f7c19ab6725a5", "type": "github" }, "original": { @@ -682,11 +682,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1743583204, - "narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=", + "lastModified": 1746141548, + "narHash": "sha256-IgBWhX7A2oJmZFIrpRuMnw5RAufVnfvOgHWgIdds+hc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434", + "rev": "f02fddb8acef29a8b32f10a335d44828d7825b78", "type": "github" }, "original": { @@ -861,11 +861,11 @@ ] }, "locked": { - "lastModified": 1741934139, - "narHash": "sha256-ZhTcTH9FoeAtbPfWGrhkH7RjLJZ7GeF18nygLAMR+WE=", + "lastModified": 1745871725, + "narHash": "sha256-M24SNc2flblWGXFkGQfqSlEOzAGZnMc9QG3GH4K/KbE=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "150b0b6f52bb422a1b232a53698606fe0320dde0", + "rev": "76bbf1a6b1378e4ab5230bad00ad04bc287c969e", "type": "github" }, "original": { diff --git a/machines/doretta/default.nix b/machines/doretta/default.nix index eb8dd38..2290868 100644 --- a/machines/doretta/default.nix +++ b/machines/doretta/default.nix @@ -35,44 +35,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. @@ -119,7 +163,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; diff --git a/machines/vm/foolcreek/default.nix b/machines/vm/foolcreek/default.nix index d0754ee..0b0fa7c 100644 --- a/machines/vm/foolcreek/default.nix +++ b/machines/vm/foolcreek/default.nix @@ -26,9 +26,18 @@ # }; # }; microvm = { + forwardPorts = [ # forward local port 2222-> 22, to ssh into the VM + { from = "host"; host.port = 2222; guest.port = 22; } + + # forward local port 80 -> 10.1.11.100:80 in the VLAN + { from = "guest"; host.port = 8080; guest.port = 80; # website + # guest.address = "10.1.11.101"; guest.port = 80; + # host.address = "127.0.0.1"; host.port = 80; + } + ]; interfaces = [{ - type = "user"; - id = "foolcreek"; + type = "tap"; + id = "vm-foolcreek"; mac = "02:00:00:00:00:01"; }]; }; @@ -38,10 +47,10 @@ networks."20-lan" = { matchConfig.Type = "ether"; networkConfig = { - Address = ["10.1.11.101"]; + Address = ["10.1.11.101/24" "2001:db8::b/64"]; Gateway = "10.1.11.254"; DNS = ["8.8.8.8"]; - # IPv6AcceptRA = true; + IPv6AcceptRA = true; DHCP = "no"; }; }; |
