From daabdc5938f4b2dac6e8d3b2751165ddecd89c7d Mon Sep 17 00:00:00 2001 From: Eli Fadi Date: Tue, 3 Mar 2026 11:47:27 +0100 Subject: [PATCH] Add hardware configuration placeholders for staging and production --- hosts/production/hardware-configuration.nix | 14 ++++++++++++++ hosts/staging/hardware-configuration.nix | 17 +++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 hosts/production/hardware-configuration.nix create mode 100644 hosts/staging/hardware-configuration.nix diff --git a/hosts/production/hardware-configuration.nix b/hosts/production/hardware-configuration.nix new file mode 100644 index 0000000..58dcda4 --- /dev/null +++ b/hosts/production/hardware-configuration.nix @@ -0,0 +1,14 @@ +{ config, lib, modulesPath, ... }: +{ + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; + + fileSystems."/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; + + boot.loader.grub.enable = true; + boot.loader.grub.devices = [ "/dev/vda" ]; + + networking.useDHCP = lib.mkDefault true; +} diff --git a/hosts/staging/hardware-configuration.nix b/hosts/staging/hardware-configuration.nix new file mode 100644 index 0000000..dab1e7d --- /dev/null +++ b/hosts/staging/hardware-configuration.nix @@ -0,0 +1,17 @@ +{ config, lib, modulesPath, ... }: +{ + # Good defaults for cloud VMs + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; + + # Placeholder root FS (you MUST replace this on real machines) + fileSystems."/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; + + # Placeholder bootloader target (adjust /dev/vda vs /dev/sda depending on provider) + boot.loader.grub.enable = true; + boot.loader.grub.devices = [ "/dev/vda" ]; + + networking.useDHCP = lib.mkDefault true; +}