modules/networking: init with vstub from backbone-routing

This commit is contained in:
Max Headroom 2023-10-24 23:38:11 +02:00
parent b11d28ebad
commit 964b5dbe12
3 changed files with 20 additions and 11 deletions

View file

@ -1,4 +1,4 @@
{ config, depot, ... }:
{ depot, ... }:
let
inherit (depot.reflection) interfaces;
in
@ -16,14 +16,4 @@ in
"10.10.0.0/16"
];
};
networking.interfaces.${interfaces.vstub.link} = {
virtual = true;
ipv4.addresses = [
{
address = interfaces.vstub.addr;
prefixLength = 32;
}
];
};
}

View file

@ -0,0 +1,17 @@
{ depot, lib, ... }:
let
inherit (depot.reflection) interfaces;
in
{
networking.interfaces = lib.mkIf (interfaces ? vstub) {
${interfaces.vstub.link} = {
virtual = true;
ipv4.addresses = [
{
address = interfaces.vstub.addr;
prefixLength = 32;
}
];
};
};
}

View file

@ -22,6 +22,7 @@ in
maintenance = ./maintenance;
minimal = ./minimal;
motd = ./motd;
networking = ./networking;
nix-builder = ./nix-builder;
nix-config-server = ./nix-config/server.nix;
nix-register-flakes = ./nix-register-flakes;
@ -54,6 +55,7 @@ in
external-storage
fail2ban
motd
networking
nix-config-server
system-info
system-recovery