nixos/nextcloud: refactor database.createLocally

Fixes https://github.com/NixOS/nixpkgs/issues/228971
This commit is contained in:
Gabriel Fontes 2023-04-30 14:34:42 -03:00
parent d9ad436f9a
commit fddf531c6f
No known key found for this signature in database
GPG key ID: 2E54EA7BFE630916
6 changed files with 80 additions and 96 deletions

View file

@ -26,24 +26,13 @@ in {
redis = false;
memcached = true;
};
database.createLocally = true;
config = {
dbtype = "mysql";
dbname = "nextcloud";
dbuser = "nextcloud";
dbhost = "127.0.0.1";
dbport = 3306;
dbpassFile = "${pkgs.writeText "dbpass" "hunter2" }";
# Don't inherit adminuser since "root" is supposed to be the default
adminpassFile = "${pkgs.writeText "adminpass" adminpass}"; # Don't try this at home!
};
};
systemd.services.nextcloud-setup= {
requires = ["mysql.service"];
after = ["mysql.service"];
};
services.memcached.enable = true;
};
};