remove non-building ntp service from test config
This commit is contained in:
parent
b002a94e07
commit
0896c9c1d3
1 changed files with 12 additions and 18 deletions
|
@ -2,6 +2,7 @@
|
||||||
let
|
let
|
||||||
inherit (pkgs.liminix.networking) interface address udhcpc odhcpc route;
|
inherit (pkgs.liminix.networking) interface address udhcpc odhcpc route;
|
||||||
inherit (pkgs.liminix.services) oneshot longrun bundle target;
|
inherit (pkgs.liminix.services) oneshot longrun bundle target;
|
||||||
|
inherit (pkgs) writeText;
|
||||||
in rec {
|
in rec {
|
||||||
imports = [
|
imports = [
|
||||||
./modules/tftpboot.nix
|
./modules/tftpboot.nix
|
||||||
|
@ -17,24 +18,6 @@ in rec {
|
||||||
let iface = interface { type = "hardware"; device = "eth1"; };
|
let iface = interface { type = "hardware"; device = "eth1"; };
|
||||||
in odhcpc iface { uid = "e7"; };
|
in odhcpc iface { uid = "e7"; };
|
||||||
|
|
||||||
services.ntp = longrun {
|
|
||||||
name = "ntp";
|
|
||||||
run = let inherit (services) dhcpv4 dhcpv6;
|
|
||||||
in "${pkgs.ntp}/bin/ntpd $(output ${dhcpv4} ntp_servers) $(output ${dhcpv6} NTP_IP)";
|
|
||||||
|
|
||||||
# I don't think it's possible to standardise the file names
|
|
||||||
# generally, as different services have different outputs, but it
|
|
||||||
# would be cool if services that provide an interface could use
|
|
||||||
# the same name as each other. e.g. for anything implementing
|
|
||||||
# addressProvider you might expect (output svc "address") or
|
|
||||||
# (output svc "family") to work. Otherwise switching a network link
|
|
||||||
# from static to dhcp might require reviewing all the downstreams
|
|
||||||
# that refer to it.
|
|
||||||
# Also, services should declare the outputs they provide
|
|
||||||
outputs = [];
|
|
||||||
dependencies = [services.dhcpv4];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.defaultroute4 = route {
|
services.defaultroute4 = route {
|
||||||
name = "defautlrote";
|
name = "defautlrote";
|
||||||
via = "$(output ${services.dhcpv4} address)";
|
via = "$(output ${services.dhcpv4} address)";
|
||||||
|
@ -53,6 +36,17 @@ in rec {
|
||||||
dependencies = [iface];
|
dependencies = [iface];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.ntp =
|
||||||
|
let config = writeText "chrony.conf" ''
|
||||||
|
pool pool.ntp.org iburst
|
||||||
|
dumpdir /run/chrony
|
||||||
|
makestep 1.0 3
|
||||||
|
'';
|
||||||
|
in longrun {
|
||||||
|
name = "ntp";
|
||||||
|
run = "${pkgs.chrony}/bin/chronyd -f ${config} -d";
|
||||||
|
};
|
||||||
|
|
||||||
services.default = target {
|
services.default = target {
|
||||||
name = "default";
|
name = "default";
|
||||||
contents = with services; [ loopback ntp defaultroute4 ];
|
contents = with services; [ loopback ntp defaultroute4 ];
|
||||||
|
|
Loading…
Reference in a new issue