Loading nixos/modules/services/networking/avahi-daemon.nix +27 −9 Original line number Diff line number Diff line Loading @@ -17,7 +17,8 @@ let browse-domains=${concatStringsSep ", " browseDomains} use-ipv4=${yesNo ipv4} use-ipv6=${yesNo ipv6} ${optionalString (interfaces!=null) "allow-interfaces=${concatStringsSep "," interfaces}"} ${optionalString (allowInterfaces!=null) "allow-interfaces=${concatStringsSep "," allowInterfaces}"} ${optionalString (denyInterfaces!=null) "deny-interfaces=${concatStringsSep "," denyInterfaces}"} ${optionalString (domainName!=null) "domain-name=${domainName}"} allow-point-to-point=${yesNo allowPointToPoint} ${optionalString (cacheEntriesMax!=null) "cache-entries-max=${toString cacheEntriesMax}"} Loading @@ -39,6 +40,10 @@ let ''; in { imports = [ (lib.mkRenamedOptionModule [ "services" "avahi" "interfaces" ] [ "services" "avahi" "allowInterfaces" ]) ]; options.services.avahi = { enable = mkOption { type = types.bool; Loading Loading @@ -91,7 +96,7 @@ in description = lib.mdDoc "Whether to use IPv6."; }; interfaces = mkOption { allowInterfaces = mkOption { type = types.nullOr (types.listOf types.str); default = null; description = lib.mdDoc '' Loading @@ -101,6 +106,17 @@ in ''; }; denyInterfaces = mkOption { type = types.nullOr (types.listOf types.str); default = null; description = lib.mdDoc '' List of network interfaces that should be ignored by the {command}`avahi-daemon`. Other unspecified interfaces will be used, unless {option}`allowInterfaces` is set. This option takes precedence over {option}`allowInterfaces`. ''; }; openFirewall = mkOption { type = types.bool; default = true; Loading Loading @@ -246,10 +262,12 @@ in environment.systemPackages = [ pkgs.avahi ]; environment.etc = (mapAttrs' (n: v: nameValuePair environment.etc = (mapAttrs' (n: v: nameValuePair "avahi/services/${n}.service" { ${if types.path.check v then "source" else "text"} = v; } ) cfg.extraServiceFiles); ) cfg.extraServiceFiles); systemd.sockets.avahi-daemon = { description = "Avahi mDNS/DNS-SD Stack Activation Socket"; Loading Loading
nixos/modules/services/networking/avahi-daemon.nix +27 −9 Original line number Diff line number Diff line Loading @@ -17,7 +17,8 @@ let browse-domains=${concatStringsSep ", " browseDomains} use-ipv4=${yesNo ipv4} use-ipv6=${yesNo ipv6} ${optionalString (interfaces!=null) "allow-interfaces=${concatStringsSep "," interfaces}"} ${optionalString (allowInterfaces!=null) "allow-interfaces=${concatStringsSep "," allowInterfaces}"} ${optionalString (denyInterfaces!=null) "deny-interfaces=${concatStringsSep "," denyInterfaces}"} ${optionalString (domainName!=null) "domain-name=${domainName}"} allow-point-to-point=${yesNo allowPointToPoint} ${optionalString (cacheEntriesMax!=null) "cache-entries-max=${toString cacheEntriesMax}"} Loading @@ -39,6 +40,10 @@ let ''; in { imports = [ (lib.mkRenamedOptionModule [ "services" "avahi" "interfaces" ] [ "services" "avahi" "allowInterfaces" ]) ]; options.services.avahi = { enable = mkOption { type = types.bool; Loading Loading @@ -91,7 +96,7 @@ in description = lib.mdDoc "Whether to use IPv6."; }; interfaces = mkOption { allowInterfaces = mkOption { type = types.nullOr (types.listOf types.str); default = null; description = lib.mdDoc '' Loading @@ -101,6 +106,17 @@ in ''; }; denyInterfaces = mkOption { type = types.nullOr (types.listOf types.str); default = null; description = lib.mdDoc '' List of network interfaces that should be ignored by the {command}`avahi-daemon`. Other unspecified interfaces will be used, unless {option}`allowInterfaces` is set. This option takes precedence over {option}`allowInterfaces`. ''; }; openFirewall = mkOption { type = types.bool; default = true; Loading Loading @@ -246,10 +262,12 @@ in environment.systemPackages = [ pkgs.avahi ]; environment.etc = (mapAttrs' (n: v: nameValuePair environment.etc = (mapAttrs' (n: v: nameValuePair "avahi/services/${n}.service" { ${if types.path.check v then "source" else "text"} = v; } ) cfg.extraServiceFiles); ) cfg.extraServiceFiles); systemd.sockets.avahi-daemon = { description = "Avahi mDNS/DNS-SD Stack Activation Socket"; Loading