liminix/vanilla-configuration.nix

37 lines
872 B
Nix
Raw Permalink Normal View History

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