From a2dc5db298ef92c97f3a43b06d5eb6a130dd6fc3 Mon Sep 17 00:00:00 2001 From: C4 Patino Date: Wed, 9 Jul 2025 14:18:31 -0500 Subject: [PATCH] feat: added tobira configuration for hetzner cloud vps device --- README.md | 24 +++++++++----- modules/nixos/services/networking/default.nix | 4 +++ .../tobira/hardware-configuration.nix | 31 +++++++++++++++++++ 3 files changed, 51 insertions(+), 8 deletions(-) create mode 100755 systems/x86_64-linux/tobira/hardware-configuration.nix diff --git a/README.md b/README.md index 2377876..8a61d86 100755 --- a/README.md +++ b/README.md @@ -2,15 +2,23 @@ ![logo](./demo.png) -Meticulously crafted collection of NixOS configurations tailored for my systems. This repository encapsulates a unified setup across different machines, ensuring a consistent and efficient environment no matter where I'm working. The configurations are designed with modularity and clarity in mind, making it easy to adapt and scale. Whether it's setting up a new machine or refining an existing setup, ゆめあみ brings what I believe to be the best practices in NixOS configuration management, unified under a single, cohesive structure. +Meticulously crafted collection of NixOS configurations tailored for my +systems. This repository encapsulates a unified setup across different +machines, ensuring a consistent and efficient environment no matter where I'm +working. The configurations are designed with modularity and clarity in mind, +making it easy to adapt and scale. Whether it's setting up a new machine or +refining an existing setup, ゆめあみ brings what I believe to be the best +practices in NixOS configuration management, unified under a single, cohesive +structure. -| System | Architecture | Description | -|-------------|------------------|-------------------------------------------| -| 🧠 arisu | `x86_64-linux` | primary development tower, custom built | -| 💖 kokoro | `x86_64-linux` | thinkBook 15 laptop, mobile development | -| 🌸 shiori | `x86_64-linux` | always-on mini pc, quiet and stable host | -| 🐣 chibi | `aarch64-linux` | raspberry Pi 4B for hosting and local dev | -| ✨ hikari | `x86_64-linux` | custom installer iso, new systems and VMs | +| System | Architecture | Description | +|-------------|------------------|---------------------------------------------| +| 🧠 arisu | `x86_64-linux` | primary development tower, custom built | +| 💖 kokoro | `x86_64-linux` | thinkBook 15 laptop, mobile development | +| 🌸 shiori | `x86_64-linux` | always-on mini pc, quiet and stable host | +| 🐣 chibi | `aarch64-linux` | raspberry Pi 4B for hosting and local dev | +| 🚪 tobira | `x86_64-linux` | hetzner cloud VPS for outside communication | +| ✨ hikari | `x86_64-linux` | custom installer iso, new systems and VMs | ## Repository Structure diff --git a/modules/nixos/services/networking/default.nix b/modules/nixos/services/networking/default.nix index 3d13d09..f3d0346 100644 --- a/modules/nixos/services/networking/default.nix +++ b/modules/nixos/services/networking/default.nix @@ -41,6 +41,10 @@ in { default = {}; description = "Set of apps to reverse-proxy using Apache, keyed by service name."; }; + gateways = mkOption { + type = listOf str; + description = "Names of devices which will serve as public gateways."; + }; }; config = { diff --git a/systems/x86_64-linux/tobira/hardware-configuration.nix b/systems/x86_64-linux/tobira/hardware-configuration.nix new file mode 100755 index 0000000..478c2eb --- /dev/null +++ b/systems/x86_64-linux/tobira/hardware-configuration.nix @@ -0,0 +1,31 @@ +# 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, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; + boot.initrd.systemd.tpm2.enable = false; + + # 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.end0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlan0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}