anchor.diff:                  PIDFile = "/run/sshd.pid";
                 });
             };
  +
  +        sshd-keygen-service =
  +          { description = "SSH Host Key Generation";
  +            path = [ cfgc.package ];
  +            script =
  +            ''
  +              mkdir -m 0755 -p /etc/ssh
  +              ${flip concatMapStrings cfg.hostKeys (k: ''
  +                if ! [ -f "${k.path}" ]; then
  +                  ssh-keygen -t "${k.type}" ${if k ? bits then "-b ${toString k.bits}" else ""} -f "${k.path}" -N ""
  +                fi
  +              '')}
  +            '';
  +
  +            serviceConfig = {
  +              Type = "oneshot";
  +              RemainAfterExit = "yes";
  +            };
  +          };
  +
         in
   
         if cfg.startWhenNeeded then {
  
positive.code:             socketConfig.Accept = true;
            };
  
          services."sshd@" = service;
  
        } else {
  
          services.sshd = service;
  
        };
  
  
negative.code: 
      systemd =
        let
          sshd-service =
            { description = "SSH Daemon";
  
              wantedBy = optional (!cfg.startWhenNeeded) "multi-user.target";
  