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
|
let
|
||||||
inherit (depot.reflection) interfaces;
|
inherit (depot.reflection) interfaces;
|
||||||
in
|
in
|
||||||
|
@ -16,14 +16,4 @@ in
|
||||||
"10.10.0.0/16"
|
"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;
|
maintenance = ./maintenance;
|
||||||
minimal = ./minimal;
|
minimal = ./minimal;
|
||||||
motd = ./motd;
|
motd = ./motd;
|
||||||
|
networking = ./networking;
|
||||||
nix-builder = ./nix-builder;
|
nix-builder = ./nix-builder;
|
||||||
nix-config-server = ./nix-config/server.nix;
|
nix-config-server = ./nix-config/server.nix;
|
||||||
nix-register-flakes = ./nix-register-flakes;
|
nix-register-flakes = ./nix-register-flakes;
|
||||||
|
@ -54,6 +55,7 @@ in
|
||||||
external-storage
|
external-storage
|
||||||
fail2ban
|
fail2ban
|
||||||
motd
|
motd
|
||||||
|
networking
|
||||||
nix-config-server
|
nix-config-server
|
||||||
system-info
|
system-info
|
||||||
system-recovery
|
system-recovery
|
||||||
|
|
Loading…
Reference in a new issue