From 1d32904ff53eb90873f8da91cac6472a921ad9ab Mon Sep 17 00:00:00 2001 From: tux Date: Sun, 5 Jan 2025 02:21:18 +0530 Subject: [PATCH] refactor: simplify hardware config filename --- README.md | 27 ++++++++++--------- hosts/alpha/default.nix | 2 +- ...ardware-configuration.nix => hardware.nix} | 0 hosts/canopus/default.nix | 2 +- ...ardware-configuration.nix => hardware.nix} | 0 hosts/homelab/default.nix | 2 +- ...ardware-configuration.nix => hardware.nix} | 0 hosts/vega/default.nix | 2 +- ...ardware-configuration.nix => hardware.nix} | 0 9 files changed, 18 insertions(+), 17 deletions(-) rename hosts/alpha/{hardware-configuration.nix => hardware.nix} (100%) rename hosts/canopus/{hardware-configuration.nix => hardware.nix} (100%) rename hosts/homelab/{hardware-configuration.nix => hardware.nix} (100%) rename hosts/vega/{hardware-configuration.nix => hardware.nix} (100%) diff --git a/README.md b/README.md index 9024ddf..6040ceb 100644 --- a/README.md +++ b/README.md @@ -19,16 +19,17 @@ - [Pain](#spent-weeks-on-this-system-configuration-) ## Hosts -| | Type | Name | Hardware | Purpose ----|---|---|---|--- -💻 | Desktop | sirius | Ryzen 5 3600 - 64GB RAM - RTX 3080 TI | Multi-monitor desktop running Windows Subsystem for Linux. -🖥️ | Laptop | canopus | Ryzen 9 5900HS - 16 GB RAM - RTX 3060 | Optimized for productivity on the go and some gaming. -☁️ | VPS | arcturus | 4 Core - 8 GB RAM | Primary server responsible for exposing my homelab applications to the internet. -🥔 | VPS | alpha | 2 Core - 4 GB RAM | Monitors uptime and health status of all services across the infrastructure. -🥔 | Server | vega | Cortex A53 - 1 GB RAM | Running AdGuard Home for network-wide ad blocking. -☁️ | VPS | capella | 4 Core - 6 GB RAM | For running Minecraft, CS 2, Rust game servers. -🖥️ | Server | homelab | Ryzen 7 2700X - 32 GB RAM - 2060 Super | WIP, Migrating from unraid. -☁️ | VPS | node | i9-13900 - 64 GB RAM | Running Ethereum and BSC nodes. Currently in the process of migrating from Ubuntu. + +| | Type | Name | Hardware | Purpose | +| --- | ------- | -------- | -------------------------------------- | ---------------------------------------------------------------------------------- | +| 💻 | Desktop | sirius | Ryzen 5 3600 - 64GB RAM - RTX 3080 TI | Multi-monitor desktop running Windows Subsystem for Linux. | +| 🖥️ | Laptop | canopus | Ryzen 9 5900HS - 16 GB RAM - RTX 3060 | Optimized for productivity on the go and some gaming. | +| ☁️ | VPS | arcturus | 4 Core - 8 GB RAM | Primary server responsible for exposing my homelab applications to the internet. | +| 🥔 | VPS | alpha | 2 Core - 4 GB RAM | Monitors uptime and health status of all services across the infrastructure. | +| 🥔 | Server | vega | Cortex A53 - 1 GB RAM | Running AdGuard Home for network-wide ad blocking. | +| ☁️ | VPS | capella | 4 Core - 6 GB RAM | For running Minecraft, CS 2, Rust game servers. | +| 🖥️ | Server | homelab | Ryzen 7 2700X - 32 GB RAM - 2060 Super | WIP, Migrating from unraid. | +| ☁️ | VPS | node | i9-13900 - 64 GB RAM | Running Ethereum and BSC nodes. Currently in the process of migrating from Ubuntu. | ## Installation @@ -47,11 +48,11 @@ nix-shell -p disko # Partition the disk and make sure to replace DISK_PATH (eg. /dev/vda) disko --mode disko ./hosts/canopus/disko.nix --arg device '"DISK_PATH"' -# Generate the hardware-configuration.nix file for your system +# Generate the hardware.nix file for your system nixos-generate-config --no-filesystems --root /mnt -# Replace the hardware-configuration.nix with generated one -cp /mnt/etc/nixos/hardware-configuration.nix ./hosts/canopus/ +# Replace the hardware.nix with generated one +cp /mnt/etc/nixos/hardware-configuration.nix ./hosts/canopus/hardware.nix # Install nixos-install --root /mnt --flake .#canopus diff --git a/hosts/alpha/default.nix b/hosts/alpha/default.nix index a302936..07ceb27 100644 --- a/hosts/alpha/default.nix +++ b/hosts/alpha/default.nix @@ -6,7 +6,7 @@ ... }: { imports = [ - ./hardware-configuration.nix + ./hardware.nix ../common ../../modules/nixos/uptime-kuma.nix ]; diff --git a/hosts/alpha/hardware-configuration.nix b/hosts/alpha/hardware.nix similarity index 100% rename from hosts/alpha/hardware-configuration.nix rename to hosts/alpha/hardware.nix diff --git a/hosts/canopus/default.nix b/hosts/canopus/default.nix index b9bab46..76d6b22 100755 --- a/hosts/canopus/default.nix +++ b/hosts/canopus/default.nix @@ -11,7 +11,7 @@ inputs.disko.nixosModules.default (import ./disko.nix {device = "/dev/nvme0n1";}) - ./hardware-configuration.nix + ./hardware.nix ../common ../../modules/nixos/desktop diff --git a/hosts/canopus/hardware-configuration.nix b/hosts/canopus/hardware.nix similarity index 100% rename from hosts/canopus/hardware-configuration.nix rename to hosts/canopus/hardware.nix diff --git a/hosts/homelab/default.nix b/hosts/homelab/default.nix index 01d35ea..4c81eaa 100755 --- a/hosts/homelab/default.nix +++ b/hosts/homelab/default.nix @@ -9,7 +9,7 @@ inputs.disko.nixosModules.default (import ./disko.nix {device = "/dev/nvme0n1";}) - ./hardware-configuration.nix + ./hardware.nix ../common ../../modules/nixos/desktop diff --git a/hosts/homelab/hardware-configuration.nix b/hosts/homelab/hardware.nix similarity index 100% rename from hosts/homelab/hardware-configuration.nix rename to hosts/homelab/hardware.nix diff --git a/hosts/vega/default.nix b/hosts/vega/default.nix index b513e71..8b27035 100644 --- a/hosts/vega/default.nix +++ b/hosts/vega/default.nix @@ -4,7 +4,7 @@ ... }: { imports = [ - ./hardware-configuration.nix + ./hardware.nix ../common ../../modules/nixos/adguard.nix diff --git a/hosts/vega/hardware-configuration.nix b/hosts/vega/hardware.nix similarity index 100% rename from hosts/vega/hardware-configuration.nix rename to hosts/vega/hardware.nix