diff options
| author | Jakub Stachurski <j.stachurski@student.utwente.nl> | 2026-01-02 23:17:56 +0100 |
|---|---|---|
| committer | Jakub Stachurski <j.stachurski@student.utwente.nl> | 2026-01-02 23:17:56 +0100 |
| commit | e25041e3722a716338a568a1395bb17c8e09e49c (patch) | |
| tree | 424062de12e55213a12324ba4e916f43176abb4b /hosts/omega-relay/vm.nix | |
| parent | dca35cc9f01b47974783a2ad2f40382ceb364a09 (diff) | |
Add omega-relay prototype host
Diffstat (limited to 'hosts/omega-relay/vm.nix')
| -rw-r--r-- | hosts/omega-relay/vm.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/hosts/omega-relay/vm.nix b/hosts/omega-relay/vm.nix new file mode 100644 index 0000000..e2b80d1 --- /dev/null +++ b/hosts/omega-relay/vm.nix @@ -0,0 +1,38 @@ +{lib, config,...}: let + tcpFromHost = gport: hport: { + from = "host"; + proto = "tcp"; + host = { + port = hport; + address = "10.0.69.1"; + }; + guest = { + port = gport; + address = "10.0.69.2"; + }; + }; +in { + virtualisation.vmVariant = { + addons.virtualisation.isTestVM = true; + fileSystems."/" = { + device = "none"; + fsType = "tmpfs"; + options = [ + "defaults" + "size=2G" + "mode=755" + ]; + }; + virtualization = { + forwardPorts = [ + (tcpFromHost 80 8080) + (tcpFromHost 22 8022) + ]; + virtualisation = { + memorySize = 2048; # Use 2048MiB memory. + cores = 3; + graphics = true; + }; + }; + }; +} |
