2022-09-25 12:22:15 +02:00
|
|
|
{ config, pkgs, ... } :
|
2022-09-20 00:51:38 +02:00
|
|
|
let
|
2022-10-02 17:35:55 +02:00
|
|
|
inherit (pkgs.liminix.services) oneshot longrun bundle target;
|
2023-06-20 23:04:12 +02:00
|
|
|
inherit (pkgs) writeText;
|
2023-08-28 16:10:53 +02:00
|
|
|
svc = config.system.service;
|
2022-09-20 00:51:38 +02:00
|
|
|
in rec {
|
2023-02-11 14:10:38 +01:00
|
|
|
imports = [
|
2023-02-22 19:41:41 +01:00
|
|
|
./modules/wlan.nix
|
2023-08-28 16:10:53 +02:00
|
|
|
./modules/network
|
2023-07-23 00:22:45 +02:00
|
|
|
./modules/ntp
|
2023-09-01 00:52:59 +02:00
|
|
|
./modules/vlan
|
2023-02-11 14:10:38 +01:00
|
|
|
];
|
2023-03-07 23:02:24 +01:00
|
|
|
|
2022-09-20 00:51:38 +02:00
|
|
|
services.dhcpv4 =
|
2023-08-28 16:10:53 +02:00
|
|
|
let iface = svc.network.link.build { ifname = "eth1"; };
|
|
|
|
in svc.network.dhcp.client.build { interface = iface; };
|
2022-09-20 00:51:38 +02:00
|
|
|
|
2023-09-01 00:52:59 +02:00
|
|
|
services.defaultroute4 = svc.network.route.build {
|
2024-03-28 23:13:21 +01:00
|
|
|
via = "$(output ${services.dhcpv4} ip)";
|
2022-09-26 13:55:10 +02:00
|
|
|
target = "default";
|
|
|
|
dependencies = [ services.dhcpv4 ];
|
|
|
|
};
|
|
|
|
|
2023-09-01 18:34:47 +02:00
|
|
|
services.packet_forwarding = svc.network.forward.build { };
|
2022-09-22 01:10:55 +02:00
|
|
|
|
2023-08-05 15:16:54 +02:00
|
|
|
services.ntp = config.system.service.ntp.build {
|
2023-07-23 00:22:45 +02:00
|
|
|
pools = { "pool.ntp.org" = ["iburst"] ; };
|
|
|
|
};
|
2023-06-20 23:04:12 +02:00
|
|
|
|
2023-02-11 14:28:25 +01:00
|
|
|
boot.tftp = {
|
|
|
|
serverip = "192.168.8.148";
|
|
|
|
ipaddr = "192.168.8.251";
|
|
|
|
};
|
|
|
|
|
2022-09-27 17:17:55 +02:00
|
|
|
defaultProfile.packages = [ pkgs.hello ] ;
|
2022-09-20 00:51:38 +02:00
|
|
|
}
|