anchor.diff:          '';
         };
   
  +      config = mkOption {
  +        type = types.str;
  +        default = ''
  +          system_info:
  +            distro: nixos
  +          users:
  +             - root
  +
  +          disable_root: false
  +          preserve_hostname: false
  +
  +          cloud_init_modules:
  +           - migrator
  +           - seed_random
  +           - bootcmd
  +           - write-files
  +           - growpart
  +           - resizefs
  +           - set_hostname
  +           - update_hostname
  +           - update_etc_hosts
  +           - ca-certs
  +           - rsyslog
  +           - users-groups
  +
  +          cloud_config_modules:
  +           - disk_setup
  +           - mounts
  +           - ssh-import-id
  +           - set-passwords
  +           - timezone
  +           - disable-ec2-metadata
  +           - runcmd
  +           - ssh
  +
  +          cloud_final_modules:
  +           - rightscale_userdata
  +           - scripts-vendor
  +           - scripts-per-once
  +           - scripts-per-boot
  +           - scripts-per-instance
  +           - scripts-user
  +           - ssh-authkey-fingerprints
  +           - keys-to-console
  +           - phone-home
  +           - final-message
  +           - power-state-change
  +          '';
  +        description = ''cloud-init configuration.'';
  +      };
  +
       };
   
     };
   
     config = mkIf cfg.enable {
  +
  +    environment.etc."cloud/cloud.cfg".text = cfg.config;
   
       systemd.services.cloud-init-local =
         { description = "Initial cloud-init job (pre-networking)";
  
positive.code:         path = path;
          serviceConfig =
            { Type = "oneshot";
              ExecStart = "${pkgs.cloud-init}/bin/cloud-init -f ${configFile} init";
              RemainAfterExit = "yes";
              TimeoutSec = "0";
              StandardOutput = "journal+console";
  
negative.code:         path = path;
          serviceConfig =
            { Type = "oneshot";
              ExecStart = "${pkgs.cloud-init}/bin/cloud-init modules --mode=final";
              RemainAfterExit = "yes";
              TimeoutSec = "0";
              StandardOutput = "journal+console";
  