As documented in the manual, nextcloud is stateful, i.e. if you put
services.nextcloud = {
enable = true;
hostName = "oldhn.com";
settings = {
overwritehost = "oldowh.com";
};
...
}
in your configuration.nix file, run nixos-rebuild switch, change your configuration.nix to
services.nextcloud = {
enable = true;
hostName = "newhn.com";
settings = {
};
...
}
and run nixos-rebuild switch again, you will still find oldhn.com and oldowh.com in /var/lib/nextcloud/config/config.php and nextcloud will still use the old values.
I’m … not happy about that … to put it mildly. It makes services.nextcloud unusable to me.
To all those here who use services.nextcloud: How do you deal with this? Do you use the nextcloud-occ command to imperatively change the config? Do you nuke your nextcloud installation everytime you touch services.nextcloud in configuration.nix?