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

106 lines
3 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-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";
extraApps = {
inherit (config.services.nextcloud.package.packages.apps)
contacts
calendar
2024-08-17 15:31:10 +02:00
previewgenerator
twofactor_nextcloud_notification
;
2024-08-17 15:31:10 +02:00
memories = pkgs.fetchNextcloudApp {
2024-08-17 14:55:40 +02:00
sha256 = "sha256-DJPskJ4rTECTaO1XJFeOD1EfA3TQR4YXqG+NIti0UPE=";
url = "https://github.com/pulsejet/memories/releases/download/v7.3.1/memories.tar.gz";
license = "agpl3Only";
2024-08-17 15:31:10 +02:00
};
2024-08-18 15:35:30 +02:00
/*
not useful for me
registration = pkgs.fetchNextcloudApp {
sha256 = "sha256-dDaQHyHdkkd8ZammLdck2HNGqqfEaunwevdPzbWzB8Y=";
url = "https://github.com/nextcloud-releases/registration/releases/download/v2.4.0/registration-v2.4.0.tar.gz";
license = "agpl3Only";
};
*/
2024-08-17 15:31:10 +02:00
facerecognition = pkgs.fetchNextcloudApp {
2024-12-26 22:50:26 +01:00
sha256 = "sha256-FtYItN0Iy2QpSNf0GPs7fIPYgBdEuKHJGwZ7GQNySZE=";
2024-12-26 22:40:01 +01:00
url = "https://github.com/matiasdelellis/facerecognition/releases/download/v0.9.60/facerecognition.tar.gz";
2024-08-17 15:31:10 +02:00
license = "agpl3Only";
};
};
extraAppsEnable = true;
2024-08-18 19:58:22 +02:00
appstoreEnable = true; # why i would want appstore to be disabled ???
autoUpdateApps.enable = true;
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
}