Soft-Serve selfhosted git server configuration problems

I’m trying to set up soft-serve on nixos, but I’m unable to authenticate as admin user. The configuration is as follows:

}: {
  services.soft-serve = {
    enable = true;
    settings = {
      name = "Git-Pi";
      log_format = "text";
      http = {
        public_url = "<REDACTED>";
      ssh = {
        listen_addr = ":23231";
        public_url = "<REDACTED>";
        max_timeout = 30;
        idle_timeout = 120;
      stats.listen_addr = ":23233";
      initial_admin_keys = [ ''ssh-ed25519 AAAAC3...''];

The problem seems to be that the YAML builder stores the admin ssh keys in a strange way. It always adds a linebreak after the key block (ssh-ed25519 AAACAC… LINEBREAK Is there a way to prevent this?

ping @dadada since you maintain the nixos module

mine is basically the same but the admin keys are in double quotes not double-single-quotes.

" vs ''

Strangely, this does not work either. Same Problem.

Whenever I try to authenticate with the key it only tells me that the user was not found.

Digging around a bit, I found that I was just being stupid. I changed the configuration after the first run, and soft-serve never updated its database. I deleted all state from the data directory and now it works.

Sorry for stealing your time, everyone.

1 Like