anchor.diff:    overrideNameserversScript = pkgs.writeScript "02-override-dns" ''
       #!/bin/sh
       tmp=`${pkgs.coreutils}/bin/mktemp`
  -    ${pkgs.gnused}/bin/sed '/nameserver /d' /etc/resolv.conf > $tmp
  +    ${pkgs.gnused}/bin/sed -i /etc/resolv.conf \
  +      -e '/nameserver /d' > $tmp
       ${pkgs.gnugrep}/bin/grep 'nameserver ' /etc/resolv.conf | \
         ${pkgs.gnugrep}/bin/grep -vf \
           ${ns (cfg.appendNameservers ++ cfg.insertNameservers)} > $tmp.ns
  -    ${optionalString (cfg.appendNameservers != [])
  -      "${pkgs.coreutils}/bin/cat $tmp $tmp.ns ${ns cfg.appendNameservers} \
  -        > /etc/resolv.conf"}
  -    ${optionalString (cfg.insertNameservers != [])
  -      "${pkgs.coreutils}/bin/cat $tmp ${ns cfg.insertNameservers} $tmp.ns \
  -        > /etc/resolv.conf"}
  +  '' + optionalString (cfg.appendNameservers != []) ''
  +    ${pkgs.coreutils}/bin/cat $tmp $tmp.ns ${ns cfg.appendNameservers} \
  +      > /etc/resolv.conf
  +  '' + optionalString (cfg.insertNameservers != []) ''
  +    ${pkgs.coreutils}/bin/cat $tmp ${ns cfg.insertNameservers} $tmp.ns \
  +      > /etc/resolv.conf
  +  '' + ''
       ${pkgs.coreutils}/bin/rm -f $tmp $tmp.ns
     '';
   
  
positive.code: 
      [keyfile]
      ${optionalString (config.networking.hostName != "")
        ''hostname=${config.networking.hostName}''}
      ${optionalString (cfg.unmanaged != [])
        ''unmanaged-devices=${concatStringsSep ";" cfg.unmanaged}''}
  
      [logging]
      level=WARN
  
negative.code:     ResultActive=yes
    */
    polkitConf = ''
      polkit.addRule(
        function(action, subject) {
          if (
            subject.isInGroup("networkmanager")
            && (
              action.id.indexOf("org.freedesktop.NetworkManager.") == 0
              || action.id.indexOf("org.freedesktop.ModemManager")  == 0
            )
          ) {
            return polkit.Result.YES;
          }
        }
      );
    '';
  
    ipUpScript = pkgs.writeScript "01-nixos-network-online" ''
  