mirror of
https://github.com/RGBCube/ncc
synced 2026-01-15 01:31:02 +00:00
16 lines
454 B
Nix
16 lines
454 B
Nix
{ config, lib, ... }: let
|
|
inherit (config.networking.defaultGateway) interface;
|
|
inherit (lib) optionals;
|
|
in {
|
|
networking.interfaces.${interface} = {
|
|
ipv4.addresses = optionals (config.networking.ipv4 != null) [{
|
|
address = config.networking.ipv4;
|
|
prefixLength = 22;
|
|
}];
|
|
|
|
ipv6.addresses = optionals (config.networking.ipv4 != null) [{
|
|
address = config.networking.ipv6;
|
|
prefixLength = 64;
|
|
}];
|
|
};
|
|
}
|