anchor.diff:    ntpUser = "ntp";
   
     configFile = pkgs.writeText "ntp.conf" ''
  -    # Keep the drift file in ${stateDir}/ntp.drift.  However, since we
  -    # chroot to ${stateDir}, we have to specify it as /ntp.drift.
  -    driftfile /ntp.drift
  +    driftfile ${stateDir}/ntp.drift
   
  -    restrict default kod nomodify notrap nopeer noquery
  -    restrict -6 default kod nomodify notrap nopeer noquery
       restrict 127.0.0.1
       restrict -6 ::1
   
       ${toString (map (server: "server " + server + " iburst\n") config.services.ntp.servers)}
     '';
   
  -  ntpFlags = "-c ${configFile} -u ${ntpUser}:nogroup -i ${stateDir}";
  +  ntpFlags = "-c ${configFile} -u ${ntpUser}:nogroup";
   
   in
   
  
positive.code: 
    config = mkIf config.services.ntp.enable {
  
      # Make tools such as ntpq available in the system path
      environment.systemPackages = [ pkgs.ntp ];
  
      users.extraUsers = singleton
  
negative.code:         home = stateDir;
        };
  
      systemd.services.ntpd =
        { description = "NTP Daemon";
  
          wantedBy = [ "multi-user.target" ];
  
          preStart =
            ''
  