about summary refs log tree commit diff
path: root/configurations/tulkas
diff options
context:
space:
mode:
authorazahi <azat@bahawi.net>2024-12-02 01:13:53 +0300
committerazahi <azat@bahawi.net>2024-12-02 01:13:53 +0300
commit0df7936405dd7cfa1ed518441a154b03f1aa57bc (patch)
treede5a0042316f821475e829885c3120aaa6725926 /configurations/tulkas
parent2024-11-30 (diff)
2024-12-02
Diffstat (limited to '')
-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