mirror of
https://github.com/RGBCube/ncc
synced 2025-07-27 10:07:44 +00:00
14 lines
452 B
Nix
14 lines
452 B
Nix
{ config, lib, ... }: let
|
|
inherit (config.networking.defaultGateway) interface;
|
|
inherit (lib) optionals;
|
|
in {
|
|
networking.interfaces.${interface} = {
|
|
ipv4.addresses = optionals (config.networking.ipv4.address != null) [{
|
|
inherit (config.networking.ipv4) address prefixLength;
|
|
}];
|
|
|
|
ipv6.addresses = optionals (config.networking.ipv6.address != null) [{
|
|
inherit (config.networking.ipv6) address prefixLength;
|
|
}];
|
|
};
|
|
}
|