Repository navigation
Conversation
5b6d613 to
60a96a7
Compare
|
so the nixos tests are happy now. still haven't tested it manually though |
60a96a7 to
0caa7e3
Compare
Ma27
left a comment
There was a problem hiding this comment.
The MySQL test seems to be having some issues - even though it succeeds:
nextcloud: must succeed: curl -sSf http://nextcloud/login
nextcloud # [ 17.332546] nginx[866]: 2022/02/20 16:23:45 [error] 866#866: *1 FastCGI sent in stderr: "PHP message: PHP Warning: Undefined array key "CREDENTIALS_DIRECTORY" in /nix/store/yzhadqgd4qhvxxkqw6sqy2pfmfc1l10y-nextcloud-config.php on line 3" while reading response header from upstream, client: ::1, server: nextcloud, request: "GET /login HTTP/1.1", upstream: "fastcgi://unix:/run/phpfpm/nextcloud.sock:", host: "nextcloud"
Also, nextcloud-occ doesn't seem to know about CREDENTIALS_DIRECTORY as well, correct?
| "adminpass:${cfg.config.adminpassFile}" | ||
| (lib.optional (cfg.config.dbpassFile != null) "dbpass:${cfg.config.dbpassFile}") | ||
| (lib.optional (cfg.config.objectstore.s3.enable) "s3:${cfg.config.objectstore.s3.secretFile}") | ||
| ]; |
There was a problem hiding this comment.
Rather than duplicating the value of LoadCredential for several services, how about declaring it once at the top?
Also, how about
[ "adminpass:${cfg.config.adminpassFile}" ]
++ lib.optional (cfg.config.dbpassFile != null) "dbpass:${cfg.config.dbpassFile}"| # "The files of the app [all apps in /var/lib/nextcloud/apps] were not replaced correctly" | ||
| # Restarting phpfpm on Nextcloud package update fixes these issues (but this is a workaround). | ||
| phpfpm-nextcloud.restartTriggers = [ cfg.package ]; | ||
| phpfpm-nextcloud.serviceConfig.LoadCredential = lib.flatten [ |
There was a problem hiding this comment.
This lib.flatten is unneeded, right?
There was a problem hiding this comment.
afair lib.optinonal false ... returns [] which are filtered out by flatten
There was a problem hiding this comment.
Ah, right.
I guess to avoid lib.flatten you'd have to use this style: [ elem1 ] ++ lib.optional cond elem2
There was a problem hiding this comment.
yeah but that looked worse IMHO :)
|
probably won't have time to ever finish this |
Motivation for this change
It's tedious to setup something to chown the secrets to the nextcloud user. also I think we should use more LoadCredential everywhere since it seems like the better way to handle credentials.
Haven't tested this yet, so it will stay a draft for now
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes