selfprivacy-nixos-config/nextcloud/nextcloud.nix

35 lines
879 B
Nix
Raw Normal View History

2021-11-15 12:02:05 +02:00
{ pkgs, config, ... }:
let
cfg = config.services.userdata;
in
{
services.nextcloud = {
enable = cfg.nextcloud.enable;
2021-11-15 12:32:52 +02:00
package = pkgs.nextcloud22;
2021-11-15 12:02:05 +02:00
hostName = "cloud.${cfg.domain}";
# Use HTTPS for links
https = false;
# Auto-update Nextcloud Apps
autoUpdateApps.enable = true;
# Set what time makes sense for you
autoUpdateApps.startAt = "05:00:00";
config = {
# Further forces Nextcloud to use HTTPS
overwriteProtocol = "http";
# Nextcloud PostegreSQL database configuration, recommended over using SQLite
dbtype = "sqlite";
dbuser = "nextcloud";
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
dbname = "nextcloud";
dbpassFile = "/var/lib/nextcloud/db-pass";
2021-11-15 12:02:05 +02:00
adminpassFile = "/var/lib/nextcloud/admin-pass";
2021-11-15 12:02:05 +02:00
adminuser = "admin";
};
};
}