summary refs log tree commit diff
path: root/machines
diff options
context:
space:
mode:
authorMel <mel@rnrd.eu>2025-10-03 17:44:48 +0200
committerMel <mel@rnrd.eu>2025-10-03 17:44:48 +0200
commit79537dae587a8ec0efa7e990ba41eebb51df2019 (patch)
tree1368e34d8b8620149fffbad93f8ada88b4b2c216 /machines
parent640a8bd6886c12f48d1f0230d60ed69bd8e46880 (diff)
downloadnetwork-79537dae587a8ec0efa7e990ba41eebb51df2019.tar.zst
network-79537dae587a8ec0efa7e990ba41eebb51df2019.zip
Add new taureau host
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'machines')
-rw-r--r--machines/taureau/default.nix29
-rw-r--r--machines/taureau/devices.nix39
-rw-r--r--machines/taureau/hardware.nix30
-rw-r--r--machines/taureau/home.nix9
4 files changed, 107 insertions, 0 deletions
diff --git a/machines/taureau/default.nix b/machines/taureau/default.nix
new file mode 100644
index 0000000..8c6b092
--- /dev/null
+++ b/machines/taureau/default.nix
@@ -0,0 +1,29 @@
+{ me, machines, ... }:
+
+{
+  imports = [
+    ../../modules/common.nix
+
+    ./hardware.nix
+    ./devices.nix
+  ];
+
+  foundation = {
+    www = {
+      enable = true;
+
+      public = true;
+      tailnet = false;
+    };
+
+    monitoring = {
+      client.enable = true;
+      services = [
+        "base"
+        "tailnet"
+      ];
+    };
+  };
+
+  system.stateVersion = "25.05";
+}
diff --git a/machines/taureau/devices.nix b/machines/taureau/devices.nix
new file mode 100644
index 0000000..b48c84b
--- /dev/null
+++ b/machines/taureau/devices.nix
@@ -0,0 +1,39 @@
+{ config, lib, pkgs, ... }:
+
+{
+  boot = {
+    loader.grub = {
+      enable = true;
+      device = "/dev/sda";
+    };
+
+    kernelModules = [ "wireguard" ];
+  };
+
+  networking = {
+    nameservers = [
+      "1.1.1.1" "1.0.0.1"
+    ];
+    # networkd handles our network
+    useDHCP = false;
+  };
+
+  systemd.network.enable = true;
+  systemd.network.networks."10-wan" = {
+    name = "enp6s16";
+    # ipv4 gets it's config through dhcp just fine!
+    DHCP = "ipv4";
+    # as is usual, the dhcp ipv6 configuration is faulty,
+    # and does not add the correct default route.
+    address = [ "2604:2dc0:303::4:0:d9" ];
+    routes = [ { Gateway = "2604:2dc0:303::6a7e"; } ];
+  };
+
+  zramSwap = {
+    enable = true;
+    algorithm = "zstd";
+    swapDevices = 1;
+    memoryPercent = 50;
+  };
+}
+
diff --git a/machines/taureau/hardware.nix b/machines/taureau/hardware.nix
new file mode 100644
index 0000000..bbb60a5
--- /dev/null
+++ b/machines/taureau/hardware.nix
@@ -0,0 +1,30 @@
+# Do not modify this file!  It was generated by ‘nixos-generate-config’
+# and may be overwritten by future invocations.  Please make changes
+# to /etc/nixos/configuration.nix instead.
+{ config, lib, pkgs, modulesPath, ... }:
+
+{
+  imports = [ ];
+
+  boot.initrd.availableKernelModules = [ "ahci" "virtio_pci" "virtio_scsi" "xhci_pci" "sd_mod" "sr_mod" ];
+  boot.initrd.kernelModules = [ ];
+  boot.kernelModules = [ "kvm-amd" ];
+  boot.extraModulePackages = [ ];
+
+  fileSystems."/" =
+    { device = "/dev/disk/by-uuid/c28cc5af-7132-419f-a13f-b67b19838664";
+      fsType = "ext4";
+    };
+
+  swapDevices = [ ];
+
+  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
+  # (the default) this is the recommended approach. When using systemd-networkd it's
+  # still possible to use this option, but it's recommended to use it in conjunction
+  # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
+  networking.useDHCP = lib.mkDefault true;
+  # networking.interfaces.enp6s16.useDHCP = lib.mkDefault true;
+
+  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+  virtualisation.hypervGuest.enable = true;
+}
diff --git a/machines/taureau/home.nix b/machines/taureau/home.nix
new file mode 100644
index 0000000..8f27ed2
--- /dev/null
+++ b/machines/taureau/home.nix
@@ -0,0 +1,9 @@
+{ pkgs, ... }:
+
+{
+  imports = [
+    ../../modules/home/common.nix
+  ];
+
+  home.stateVersion = "25.05";
+}