summaryrefslogtreecommitdiff
path: root/hosts/omega-relay/vm.nix
diff options
context:
space:
mode:
authorJakub Stachurski <jakub@wilkuu.xyz>2026-02-11 15:35:44 +0100
committerGitHub <noreply@github.com>2026-02-11 15:35:44 +0100
commit04707c728441000d64d3d750916354310ff2d2ab (patch)
treea6855656f35bc4c351e215827b58a83b4f2a99ec /hosts/omega-relay/vm.nix
parent2f65e7f40e97f6ccb3d164169698033ce1692a76 (diff)
Omega-Relay host replacement for Ubuntu VM on Feox
* Add omega-relay prototype host * Add omega-relay prototype host * Inital commit for working omega-relay host. This commit includes: - Mysql module from umbriel - Disko configuration for the Ferox VM - Freshrss module - Stalwart module - Vaultwarden module - Wakapi module - Uptime Kuma module - Support for using mysql socket - Server user that does not depend on full home-manager preset. - ACME for wilkuu.xyz domains, including all the services. * Nix fmt * Fixes in secrets and services. Mostly fixes connection to mysql and the unix-socket auth for it. * Little fixes and update * Format and do fixes * Update secrets and keys for omega-relay * Apply changes from messing around and making things work
Diffstat (limited to 'hosts/omega-relay/vm.nix')
-rw-r--r--hosts/omega-relay/vm.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/hosts/omega-relay/vm.nix b/hosts/omega-relay/vm.nix
new file mode 100644
index 0000000..6672949
--- /dev/null
+++ b/hosts/omega-relay/vm.nix
@@ -0,0 +1,43 @@
+{ ... }:
+let
+ forward = proto: gport: hport: {
+ from = "host";
+ proto = proto;
+ host = {
+ port = hport;
+ # address = "10.0.69.1";
+ };
+ guest = {
+ port = gport;
+ # address = "10.0.69.2";
+ };
+ };
+in
+{
+ # TODO: Make this into a more global module.
+ virtualisation.vmVariant = {
+ addons.virtualisation.isTestVM = true;
+ addons.virtualisation.guest = true;
+ fileSystems."/" = {
+ device = "none";
+ fsType = "tmpfs";
+ options = [
+ "defaults"
+ "size=2G"
+ "mode=755"
+ ];
+ };
+ virtualisation = {
+ forwardPorts = [
+ (forward "tcp" 80 9080)
+ (forward "tcp" 443 9443)
+ (forward "tcp" 143 9143)
+ (forward "tcp" 25 9025)
+ (forward "tcp" 22 9022)
+ ];
+ memorySize = 2048; # Use 2048MiB memory.
+ cores = 3;
+ graphics = false;
+ };
+ };
+}