anchor.diff:        description = "Etcd daemon user";
         home = cfg.dataDir;
       };
  +
     };
   }
  
positive.code:       type = types.str;
      };
  
      advertiseClientUrls = mkOption {
        description = "Etcd list of this member's client URLs to advertise to the rest of the cluster.";
        default = cfg.listenClientUrls;
        type = types.listOf types.str;
      };
  
      listenClientUrls = mkOption {
        description = "Etcd list of URLs to listen on for client traffic.";
        default = ["http://localhost:4001"];
        type = types.listOf types.str;
      };
  
      listenPeerUrls = mkOption {
        description = "Etcd list of URLs to listen on for peer traffic.";
        default = ["http://localhost:7001"];
        type = types.listOf types.str;
      };
  
      initialAdvertisePeerUrls = mkOption {
        description = "Etcd list of this member's peer URLs to advertise to rest of the cluster.";
        default = cfg.listenPeerUrls;
        type = types.listOf types.str;
      };
  
      initialCluster = mkOption {
        description = "Etcd initial cluster configuration for bootstrapping.";
        default = ["${cfg.name}=http://localhost:7001"];
        type = types.listOf types.str;
      };
  
      initialClusterState = mkOption {
        description = "Etcd initial cluster configuration for bootstrapping.";
        default = "new";
        type = types.enum ["new" "existing"];
      };
  
      initialClusterToken = mkOption {
        description = "Etcd initial cluster token for etcd cluster during bootstrap.";
        default = "etcd-cluster";
        type = types.str;
      };
  
      discovery = mkOption {
  
negative.code: let
    cfg = config.services.etcd;
  
    configFile = pkgs.writeText "etcd.conf.yaml" (''
      name: '${cfg.name}'
      data-dir: '${cfg.dataDir}'
    '' + optionalString (cfg.initialAdvertisePeerUrls != null) ''
      initial-advertise-peer-urls: ${concatStringsSep "," cfg.initialAdvertisePeerUrls}
    '' + optionalString (cfg.advertiseClientUrls != null) ''
      advertise-client-urls: ${concatStringsSep "," cfg.advertiseClientUrls}
    '' + optionalString (cfg.listenClientUrls != null) ''
      listen-client-urls: ${concatStringsSep "," cfg.listenClientUrls}
    '' + optionalString (cfg.listenPeerUrls != null) ''
      listen-peer-urls: ${concatStringsSep "," cfg.listenPeerUrls}
    '' + optionalString (cfg.initialCluster != null) ''
      initial-cluster: ${concatStringsSep "," (mapAttrsToList (n: u: "${n}=${u}") cfg.initialCluster)}
    '' + optionalString (cfg.initialClusterState != null) ''
      initial-cluster-state: ${cfg.initialClusterState}
    '' + optionalString (cfg.initialClusterToken != null) ''
      initial-cluster-token: ${cfg.initialClusterToken}
    '' + ''
      strict-reconfig-check: true
      enable-v2: false
      client-transport-security:
      peer-transport-security:
    '');
  in
  {
  
    options.services.etcd = {
  
      enable = mkOption {
        description = "Whether to enable etcd.";
        default = false;
  