Another test case.
This commit is contained in:
parent
4a4b369136
commit
62b4e8b80a
1 changed files with 41 additions and 0 deletions
41
tests/networkd-phobos.nix
Normal file
41
tests/networkd-phobos.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
# 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";
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue