From a61ca0373b63225e3aa00556c8fc1fb36abcbe3e Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 11 Oct 2020 20:45:25 +0200 Subject: nixosTests.avahi: add avahi-with-resolved This allows testing avahi works with resolved being enabled, as a regression test for https://github.com/NixOS/nixpkgs/pull/99530. --- nixos/tests/avahi.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'nixos/tests/avahi.nix') diff --git a/nixos/tests/avahi.nix b/nixos/tests/avahi.nix index fe027c14d5a..66cff3009f7 100644 --- a/nixos/tests/avahi.nix +++ b/nixos/tests/avahi.nix @@ -1,5 +1,11 @@ +{ system ? builtins.currentSystem +, config ? {} +, pkgs ? import ../.. { inherit system config; } +# bool: whether to use networkd in the tests +, networkd ? false }: + # Test whether `avahi-daemon' and `libnss-mdns' work as expected. -import ./make-test-python.nix ({ pkgs, ... } : { +import ./make-test-python.nix ({ ... } : { name = "avahi"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ eelco ]; @@ -17,6 +23,11 @@ import ./make-test-python.nix ({ pkgs, ... } : { publish.workstation = true; extraServiceFiles.ssh = "${pkgs.avahi}/etc/avahi/services/ssh.service"; }; + } // pkgs.lib.optionalAttrs (networkd) { + networking = { + useNetworkd = true; + useDHCP = false; + }; }; in { one = cfg; -- cgit 1.4.1