Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NextCloud config
- { config, lib, pkgs, ... }:
- {
- services.nextcloud.package = pkgs.nextcloud19;
- services.nextcloud = {
- enable = true;
- hostName = "xxxxxxxxx";
- #nginx.enable = true;
- https = true;
- # Where?
- home = "/media/storage/nextcloud";
- autoUpdateApps.enable = true;
- config = {
- # Further forces Nextcloud to use HTTPS
- overwriteProtocol = "https";
- # Nextcloud PostegreSQL database configuration, recommended over using SQLite
- dbtype = "pgsql";
- dbuser = "nextcloud";
- dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
- dbname = "nextcloud";
- dbpassFile = "/var/nextcloud-db-pass";
- adminpassFile = "/var/nextcloud-admin-pass";
- adminuser = "neothefox";
- };
- };
- services.postgresql = {
- enable = true;
- # Ensure the database, user, and permissions always exist
- ensureDatabases = [ "nextcloud" ];
- ensureUsers = [
- { name = "nextcloud";
- ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
- }
- ];
- };
- systemd.services."nextcloud-setup" = {
- requires = ["postgresql.service"];
- after = ["postgresql.service"];
- };
- }
Add Comment
Please, Sign In to add comment