nix-config/hosts/sisyphe/features/services/nextcloud.nix

79 lines
1.9 KiB
Nix
Raw Normal View History

2024-08-18 19:58:22 +02:00
{
config,
pkgs,
lib,
...
}:
2024-08-12 15:56:45 +02:00
{
2024-08-12 21:15:24 +02:00
imports = [
"${
fetchTarball {
url = "https://github.com/onny/nixos-nextcloud-testumgebung/archive/fa6f062830b4bc3cedb9694c1dbf01d5fdf775ac.tar.gz";
sha256 = "0gzd0276b8da3ykapgqks2zhsqdv4jjvbv97dsxg0hgrhb74z0fs";
}
}/nextcloud-extras.nix"
./nextcloud-network.nix
2024-08-12 21:15:24 +02:00
]; # adding caddy support
2024-08-12 21:52:33 +02:00
sops.secrets.adminNextcloudPass = {
owner = "nextcloud";
};
2024-08-12 21:55:10 +02:00
2024-08-12 16:09:02 +02:00
services.nextcloud = {
2024-08-12 15:56:45 +02:00
enable = true;
hostName = "cloud.hypervirtual.world";
database.createLocally = true;
2024-08-12 21:15:24 +02:00
webserver = "caddy";
configureRedis = true;
2024-12-27 13:59:52 +01:00
package = pkgs.nextcloud30;
2024-08-12 15:56:45 +02:00
config = {
dbtype = "pgsql";
2024-08-12 17:47:03 +02:00
adminpassFile = config.sops.secrets.adminNextcloudPass.path;
2024-08-12 15:56:45 +02:00
};
settings = {
enabledPreviewProviders = [
"OC\\Preview\\BMP"
"OC\\Preview\\GIF"
"OC\\Preview\\JPEG"
"OC\\Preview\\Krita"
"OC\\Preview\\MarkDown"
"OC\\Preview\\MP3"
"OC\\Preview\\OpenDocument"
"OC\\Preview\\PNG"
"OC\\Preview\\TXT"
"OC\\Preview\\XBitmap"
"OC\\Preview\\HEIC"
];
trustedDomains = [ "cloud.hypervirtual.world" ];
overwriteprotocol = "https";
log_type = "file"; # temporary fix for https://nixos.org/manual/nixos/stable/#module-services-nextcloud-warning-logreader
default_phone_region = "FR";
2024-08-18 19:58:22 +02:00
default_locale = "fr_FR";
default_language = "fr";
default_timezone = "Europe/Paris";
2024-08-21 17:49:07 +02:00
"memories.exiftool" = "${lib.getExe pkgs.exiftool}";
};
2024-08-18 19:58:22 +02:00
2024-08-18 15:35:30 +02:00
phpExtraExtensions = all: [
all.pdlib
all.redis
all.bz2
];
2024-08-21 17:49:07 +02:00
2024-08-17 10:52:30 +02:00
phpOptions."opcache.interned_strings_buffer" = "23";
2024-08-18 19:58:22 +02:00
appstoreEnable = true; # why i would want appstore to be disabled ???
autoUpdateApps.enable = true;
2024-12-27 13:59:52 +01:00
cli.memoryLimit = "4G";
2024-08-12 15:56:45 +02:00
};
2024-08-21 17:49:07 +02:00
environment.systemPackages =
let
2024-10-31 15:19:25 +01:00
php = pkgs.php.buildEnv { extraConfig = "memory_limit = 4G"; };
2024-08-21 17:49:07 +02:00
in
[
php
];
2024-08-12 15:56:45 +02:00
}