WIP: ap01: towards our VLAN model #181
1 changed files with 20 additions and 14 deletions
|
@ -6,6 +6,7 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
svc = config.system.service;
|
svc = config.system.service;
|
||||||
|
parentConfig = config;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
defaultProfile.packages = with pkgs; [
|
defaultProfile.packages = with pkgs; [
|
||||||
|
@ -19,22 +20,27 @@ in
|
||||||
"${modulesPath}/kernel"
|
"${modulesPath}/kernel"
|
||||||
"${modulesPath}/outputs/tftpboot.nix"
|
"${modulesPath}/outputs/tftpboot.nix"
|
||||||
"${modulesPath}/outputs.nix"
|
"${modulesPath}/outputs.nix"
|
||||||
|
(
|
||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
services = {
|
||||||
|
# In this situation, we fallback to the appro VLAN.
|
||||||
|
# TODO: add support for the admin VLAN.
|
||||||
|
# Simplest DHCPv4 we can find.
|
||||||
|
dhcpv4 = svc.network.dhcp.client.build {
|
||||||
|
interface = parentConfig.hardware.networkInterfaces.lan;
|
||||||
|
};
|
||||||
|
inherit (parentConfig.services) sshd;
|
||||||
|
defaultroute4 = svc.network.route.build {
|
||||||
|
via = "$(output ${config.services.dhcpv4} router)";
|
||||||
|
target = "default";
|
||||||
|
dependencies = [ config.services.dhcpv4 ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
)
|
||||||
];
|
];
|
||||||
nixpkgs.buildPlatform = builtins.currentSystem;
|
nixpkgs.buildPlatform = builtins.currentSystem;
|
||||||
services = {
|
|
||||||
# In this situation, we fallback to the appro VLAN.
|
|
||||||
# TODO: add support for the admin VLAN.
|
|
||||||
# Simplest DHCPv4 we can find.
|
|
||||||
dhcpv4 = svc.network.dhcp.client.build {
|
|
||||||
interface = config.hardware.networkInterfaces.lan;
|
|
||||||
};
|
|
||||||
inherit (config.services) sshd;
|
|
||||||
defaultroute4 = svc.network.route.build {
|
|
||||||
via = "$(output ${config.services.dhcpv4} router)";
|
|
||||||
target = "default";
|
|
||||||
dependencies = [ config.services.dhcpv4 ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
defaultProfile.packages = [ mtdutils ];
|
defaultProfile.packages = [ mtdutils ];
|
||||||
# Only keep root, which should inherit from DGN access control's root permissions.
|
# Only keep root, which should inherit from DGN access control's root permissions.
|
||||||
|
|
Loading…
Reference in a new issue