modules/networking: init with vstub from backbone-routing
This commit is contained in:
parent
b11d28ebad
commit
964b5dbe12
3 changed files with 20 additions and 11 deletions
|
@ -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;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
17
modules/networking/default.nix
Normal file
17
modules/networking/default.nix
Normal 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;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue