feat(hosts): example template host
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
7c9ce3fe10
commit
efe328eb7b
2 changed files with 90 additions and 0 deletions
44
hosts/example/hardware-configuration.nix
Normal file
44
hosts/example/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# PLACEHOLDER hardware scan — REPLACE before building on real hardware:
|
||||
# sudo nixos-generate-config --show-hardware-config > hardware-configuration.nix
|
||||
#
|
||||
# This generic stub exists only so the `example` host evaluates/builds as a
|
||||
# template (and so the template can't silently rot in CI). The by-label
|
||||
# devices below will NOT match your machine — a real scan captures your
|
||||
# actual disks, filesystems, kernel modules, and CPU microcode.
|
||||
#
|
||||
# hostPlatform is set by lib/mksystem.nix; the bootloader (systemd-boot)
|
||||
# by modules/boot.nix — so this file only needs filesystems.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"nvme"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/boot";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue