From 79537dae587a8ec0efa7e990ba41eebb51df2019 Mon Sep 17 00:00:00 2001 From: Mel Date: Fri, 3 Oct 2025 17:44:48 +0200 Subject: Add new taureau host Signed-off-by: Mel --- machines/taureau/default.nix | 29 +++++++++++++++++++++++++++++ machines/taureau/devices.nix | 39 +++++++++++++++++++++++++++++++++++++++ machines/taureau/hardware.nix | 30 ++++++++++++++++++++++++++++++ machines/taureau/home.nix | 9 +++++++++ 4 files changed, 107 insertions(+) create mode 100644 machines/taureau/default.nix create mode 100644 machines/taureau/devices.nix create mode 100644 machines/taureau/hardware.nix create mode 100644 machines/taureau/home.nix (limited to 'machines') 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..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"; +} -- cgit 1.4.1