about summary refs log tree commit diff
path: root/configurations/tulkas/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'configurations/tulkas/default.nix')
-rw-r--r--configurations/tulkas/default.nix62
1 files changed, 62 insertions, 0 deletions
diff --git a/configurations/tulkas/default.nix b/configurations/tulkas/default.nix
new file mode 100644
index 0000000..c4ab860
--- /dev/null
+++ b/configurations/tulkas/default.nix
@@ -0,0 +1,62 @@
+{ lib, this, ... }:
+with lib;
+{
+  imports = attrValues (modulesIn ./.);
+
+  nixfiles.modules = {
+    wireguard.client.enable = true;
+  };
+
+  services.qemuGuest.enable = true;
+
+  systemd.network.networks."40-eth0" = {
+    addresses = [
+      {
+        Address = this.ipv4.address;
+        Broadcast = true;
+      }
+    ];
+    routes = [
+      {
+        Gateway = this.ipv4.gatewayAddress;
+        GatewayOnLink = true;
+      }
+    ];
+  };
+
+  boot.loader.systemd-boot.enable = true;
+
+  disko.devices.disk.vda = {
+    device = "/dev/vda";
+    type = "disk";
+    content = {
+      type = "gpt";
+      partitions = {
+        esp = {
+          name = "ESP";
+          type = "EF00";
+          size = "512M";
+          content = {
+            type = "filesystem";
+            format = "vfat";
+            mountpoint = "/boot";
+          };
+        };
+        root = {
+          size = "100%";
+          content = {
+            type = "filesystem";
+            format = "xfs";
+            mountpoint = "/";
+            mountOptions = [ "noatime" ];
+          };
+        };
+      };
+    };
+  };
+
+  zramSwap = {
+    enable = true;
+    memoryPercent = 50;
+  };
+}

Consider giving Nix/NixOS a try! <3