anchor.diff:  { config, lib, pkgs, ... }:
   
   with lib;
  -
  +let
  +  cfg = config.services.resolved;
  +in
   {
   
     options = {
  
positive.code:       '';
      };
  
    };
  
    config = mkIf config.services.resolved.enable {
  
      systemd.additionalUpstreamSystemUnits = [ "systemd-resolved.service" ];
  
  
negative.code: 
      environment.etc."systemd/resolved.conf".text = ''
        [Resolve]
        ${optionalString (config.networking.nameservers != [])
          "DNS=${concatStringsSep " " config.networking.nameservers}"}
        ${optionalString (cfg.fallbackDns != [])
          "FallbackDNS=${concatStringsSep " " cfg.fallbackDns}"}
        ${optionalString (cfg.domains != [])
          "Domains=${concatStringsSep " " cfg.domains}"}
        LLMNR=${cfg.llmnr}
        DNSSEC=${cfg.dnssec}
        ${config.services.resolved.extraConfig}
      '';
  
    };
  