Brendan Golden
8b09e7962b
They wont be built/deployed now without an ip assigned. See the "fun" over here https://discord.com/channels/689189992417067052/1118476661604765746/1125914392102445220
17 lines
No EOL
426 B
Nix
17 lines
No EOL
426 B
Nix
{ config, options, lib, ... }: with lib;
|
|
let
|
|
# get a list of interfaces
|
|
interfaces = attrNames config.networking.interfaces;
|
|
# check if an IP has been assigned
|
|
has_ip = interface: (length config.networking.interfaces."${interface}".ipv4.addresses) != 0;
|
|
in {
|
|
config = {
|
|
assertions = [
|
|
{
|
|
assertion = lists.any has_ip interfaces;
|
|
message = "Must have a ip address set";
|
|
}
|
|
];
|
|
};
|
|
|
|
} |