mob next [ci-skip] [ci skip] [skip ci]
lastFile:routers/yada-house/device.nix
This commit is contained in:
41
routers/vanilla/configuration.nix
Normal file
41
routers/vanilla/configuration.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ inputs }:
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
inherit (pkgs.liminix.services) target;
|
||||
svc = config.system.service;
|
||||
in
|
||||
rec {
|
||||
imports = [
|
||||
"${inputs.liminix}/modules/wlan.nix"
|
||||
"${inputs.liminix}/modules/network"
|
||||
"${inputs.liminix}/modules/ntp"
|
||||
"${inputs.liminix}/modules/vlan"
|
||||
];
|
||||
|
||||
services.dhcpv4 =
|
||||
let
|
||||
iface = svc.network.link.build { ifname = "eth1"; };
|
||||
in
|
||||
svc.network.dhcp.client.build { interface = iface; };
|
||||
|
||||
services.defaultroute4 = svc.network.route.build {
|
||||
via = "$(output ${services.dhcpv4} ip)";
|
||||
target = "default";
|
||||
dependencies = [ services.dhcpv4 ];
|
||||
};
|
||||
|
||||
services.packet_forwarding = svc.network.forward.build { };
|
||||
|
||||
services.ntp = config.system.service.ntp.build {
|
||||
pools = {
|
||||
"pool.ntp.org" = [ "iburst" ];
|
||||
};
|
||||
};
|
||||
|
||||
boot.tftp = {
|
||||
serverip = "192.168.8.148";
|
||||
ipaddr = "192.168.8.251";
|
||||
};
|
||||
|
||||
defaultProfile.packages = [ pkgs.hello ];
|
||||
}
|
Reference in New Issue
Block a user