From cbd9e9e01f89c68b25d108a78600521c2cb52039 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Fri, 8 Nov 2019 17:25:31 +0100 Subject: nixos/tinydns: order service after network.target In cases where you boot up really quickly (like in the VM test on a non-busy host), tinydns might want to bind before the loopback interface is fully up. Order tinydns after network.target to fix that. --- nixos/modules/services/networking/tinydns.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/networking/tinydns.nix b/nixos/modules/services/networking/tinydns.nix index 7b2c464ab46b..79507b2ebcdd 100644 --- a/nixos/modules/services/networking/tinydns.nix +++ b/nixos/modules/services/networking/tinydns.nix @@ -37,6 +37,7 @@ with lib; systemd.services.tinydns = { description = "djbdns tinydns server"; wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; path = with pkgs; [ daemontools djbdns ]; preStart = '' rm -rf /var/lib/tinydns -- cgit 1.4.1 From caac0964bbd85aad3d244ec414a41cc1cd9eaeb2 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Fri, 8 Nov 2019 17:16:27 +0100 Subject: nixos/tinydns: port test to python --- nixos/tests/tinydns.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/tests/tinydns.nix b/nixos/tests/tinydns.nix index cb7ee0c5fb5e..c7740d5ade35 100644 --- a/nixos/tests/tinydns.nix +++ b/nixos/tests/tinydns.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ lib, ...} : { +import ./make-test-python.nix ({ lib, ...} : { name = "tinydns"; meta = { maintainers = with lib.maintainers; [ basvandijk ]; @@ -19,8 +19,8 @@ import ./make-test.nix ({ lib, ...} : { }; }; testScript = '' - $nameserver->start; - $nameserver->waitForUnit("tinydns.service"); - $nameserver->succeed("host bla.foo.bar | grep '1\.2\.3\.4'"); + nameserver.start() + nameserver.wait_for_unit("tinydns.service") + nameserver.succeed("host bla.foo.bar | grep '1\.2\.3\.4'") ''; }) -- cgit 1.4.1