infrastructure/machines/compute01/nextcloud.nix
Tom Hubrecht 5622bc3748 feat(dgn-secrets): Add a matches option
This option allows specifying regexes tied to options.
When a secret matches a pattern, the the options are applied to it.
2023-10-02 22:48:18 +02:00

72 lines
1.4 KiB
Nix

{ config, pkgs, ... }:
let host = "cloud.dgnum.eu";
in {
services.nextcloud = {
enable = true;
hostName = host;
package = pkgs.nextcloud27;
https = true;
config = {
overwriteProtocol = "https";
dbtype = "pgsql";
adminpassFile = config.age.secrets."nextcloud-adminpass_file".path;
adminuser = "thubrecht";
defaultPhoneRegion = "FR";
trustedProxies = [ "::1" ];
objectstore.s3 = {
enable = true;
hostname = "s3.dgnum.eu";
region = "garage";
usePathStyle = true;
port = 443;
bucket = "nextcloud-dgnum";
key = "GKda5367c73ca607c349d83c35";
autocreate = false;
secretFile = config.age.secrets."nextcloud-s3_secret_file".path;
};
};
notify_push = { enable = true; };
database.createLocally = true;
configureRedis = true;
autoUpdateApps.enable = true;
enableBrokenCiphersForSSE = false;
extraOptions = {
overwritehost = host;
"overwrite.cli.url" = "https://${host}";
updatechecker = false;
allow_local_remote_servers = true;
"opcache.interned_strings_buffer" = 32;
};
};
services.nginx.virtualHosts.${host} = {
enableACME = true;
forceSSL = true;
};
environment.systemPackages = with pkgs; [
ffmpeg_6-headless
jpegoptim
exiftool
exif
];
dgn-secrets.matches."^nextcloud-.*$" = { owner = "nextcloud"; };
}