metanix/tests/networkd-phobos.nix
2025-11-29 11:31:10 -06:00

41 lines
1 KiB
Nix

# tests/networkd-phobos.nix
let
system = "x86_64-linux";
pkgs = import <nixpkgs> { inherit system; };
lib = pkgs.lib;
meta = import ../meta.nix;
addressing = import ../lib/addressing { inherit lib; };
nixos = lib.nixosSystem {
inherit system;
modules = [
# Your core Metanix module (the one you moved)
../modules/metanix/core.nix
# The systemd-networkd integration you pasted
../modules/metanix/networkd.nix
# Inline module to wire meta/addressing + identify this host
{
# Metanix world & library
inherit meta addressing;
# Who am I?
networking.hostName = "phobos";
# Optional override; here it matches hostName anyway
metanix.thisHost = "phobos";
# You can also stub other things here if needed
}
];
};
in
{
# What we care about inspecting:
systemdNetwork = nixos.config.systemd.network;
metanixHost = nixos.config.metanix.network.hosts.phobos;
metanixSubnet = nixos.config.metanix.network.subnets."home-main";
}