Introduce `modules.network`, the host-level networking foundation a Host declares once. A Host states its trunk interface and the tagged VLAN ids to materialize, and the module emits one systemd-networkd bridge per VLAN, named by the `br-vlan<id>` convention, plus the host's own management address on a chosen VLAN's bridge. The trunk and every bridge set `RequiredForOnline = "no"` so wait-online never blocks boot on a carrier-less link, and the module owns its own NetworkManager `unmanaged` guard so enabling it is self-sufficient. Two assertions tie the management VLAN to the declared VLANs and a management address to a VLAN, so an address can never be silently dropped. Enabled on neogaia as a tracer with placeholder values, proving the host build and bridge-name evaluation through `nix flake check`. No Guest is wired to a bridge yet.
74 lines
2.3 KiB
Nix
74 lines
2.3 KiB
Nix
{
|
|
config,
|
|
inputs,
|
|
pkgs,
|
|
...
|
|
}:
|
|
# neogaia — Dell XPS 13 9380 laptop.
|
|
# Disk layout is in ./disk.nix.
|
|
# `fileSystems` are derived from it, none declared here.
|
|
{
|
|
imports = [
|
|
inputs.nixos-hardware.nixosModules.dell-xps-13-9380
|
|
./hardware-configuration.nix
|
|
./disk.nix
|
|
];
|
|
|
|
system.stateVersion = "26.05";
|
|
|
|
# systemd-boot on the EFI system partition.
|
|
boot.loader.systemd-boot.enable = true;
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
boot.kernelPackages = pkgs.linuxPackages_cachyos;
|
|
|
|
# Redistributable firmware for the QCA6174 wifi (ath10k blobs).
|
|
# Intel microcode updates follow from this, so none is declared here.
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
# RAM-backed swap, no on-disk swap partition.
|
|
zramSwap.enable = true;
|
|
|
|
# So wifi can be joined from the console.
|
|
networking.networkmanager.enable = true;
|
|
|
|
# So setup can be driven over the network.
|
|
# The matching host public keys sit beside this file in plaintext, since
|
|
# publishing them is their purpose.
|
|
modules.ssh.enable = true;
|
|
modules.ssh.hostKeys.sopsFile = ../../secrets/neogaia.yaml;
|
|
modules.ssh.userKey.sopsFile = ../../secrets/neogaia.yaml;
|
|
|
|
# A machine the operator works from, so it admits the workstation keys alone.
|
|
modules.ssh.authorizedKeys = config.modules.ssh.workstationKeys;
|
|
|
|
modules.toolkit.enable = true;
|
|
|
|
# The networking foundation, enabled like any module: proves the host build
|
|
# and bridge-name evaluation path through this host's `nix flake check`.
|
|
# The trunk, VLAN ids, and management address are placeholders a real homelab
|
|
# host replaces, and the placeholder trunk names no interface this laptop has.
|
|
modules.network.enable = true;
|
|
modules.network.trunk = "enp1s0";
|
|
modules.network.vlans = [
|
|
10
|
|
20
|
|
];
|
|
modules.network.management.vlan = 10;
|
|
modules.network.management.address = "10.0.10.2/24";
|
|
|
|
# The walking-skeleton guest, enabled like any module: proves the guest path
|
|
# end to end through this host's `nix flake check`.
|
|
guests.sample.enable = true;
|
|
|
|
modules.agents.claude-code.enable = true;
|
|
modules.agents.tools.gitea-axi.enable = true;
|
|
modules.agents.pi.enable = true;
|
|
|
|
modules.desktop.enable = true;
|
|
modules.desktop.obsidian.enable = true;
|
|
|
|
time.timeZone = "America/New_York";
|
|
i18n.defaultLocale = "en_GB.UTF-8";
|
|
}
|