New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/nextcloud: add extraConfig #103323
nixos/nextcloud: add extraConfig #103323
Conversation
@@ -420,6 +428,7 @@ in { | |||
'dbtype' => '${c.dbtype}', | |||
'trusted_domains' => ${writePhpArrary ([ cfg.hostName ] ++ c.extraTrustedDomains)}, | |||
'trusted_proxies' => ${writePhpArrary (c.trustedProxies)}, | |||
${optionalString (c.extraConfig != null) c.extraConfig} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would make sense to leave an example
in the option, otherwise a developer would have to read the module's code to know how to use this.
description = '' | ||
Extra text to append to nextcloud override config options. | ||
''; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if a settings
option as described in NixOS/rfcs#42 would make sense here: otherwise people would accidentally override things, with such an approach, override and merging could be implemented in a better way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not the most fun thing to do... but I agree settings
would be a much better idea. See
return json_decode('${builtins.toJSON cfg.config}', true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if you need to code a function inside config.php? it's an executable file for a reason probably, even though I'm not a Nextcloud pro
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am using Nextcloud for a while now and newer saw this use case.
I am using Nextcloud for a while now and newer saw this use case.
[user_external](https://github.com/nextcloud/user_external#readme)
requires config modifications. I would love to do them declaratively.
|
Do you require them to be dynamic? Otherwise you could generate them with the help of nix. |
Do you require them to be dynamic? Otherwise you could generate them with the help of nix.
If the users could be generated from Nix-created user accounts with
`isNormalUser = true`, I would love to adopt such a
solution. Additionally ensuring that if I add an account later, it will
get access to Nextcloud.
Passwords may be set later or just reset - I have a mail server on my
machine, so I'm able to send and accept mail, including securely
resetting passwords. So I guess to enter for the first time the user has
to log in to shell and look in their Maildir for the password reset
link?
…---
Sincerely,
Vika
|
I'm not gonna implement any of the suggestions here, so if anyone wants this, just open a new PR. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/how-to-configure-nextcloud-to-use-s3-object-storage/15180/2 |
Motivation for this change
Fixes #103320 cc @nivadis
I had this laying around, but never got around to upstreaming it.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)