nixos-config/modules/services/nextcloud.nix

32 lines
991 B
Nix
Raw Normal View History

2025-09-24 17:08:14 +02:00
{ pkgs, ...}:
{
services.nginx.enable = false ;
services.phpfpm.pools.nextcloud.settings."listen.owner" = "nextcloud";
services.phpfpm.pools.nextcloud.settings."listen.group" = "caddy";
services.phpfpm.pools.nextcloud.settings."listen.mode" = "0660";
services.caddy.virtualHosts."koum.porzh.me".extraConfig = ''
root * ${pkgs.nextcloud31}/
php_fastcgi unix//run/phpfpm/nextcloud.sock
file_server
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains"
X-Content-Type-Options" "nosniff"
X-Frame-Options "SAMEORIGIN"
X-XSS-Protection "1; mode=block"
Referrer-Policy "same-origin"
# Permission-Policy "camera=(), moicrophone=(), geolocation=()"
}
'';
services.nextcloud = {
enable = true ;
package = pkgs.nextcloud31;
hostName = "koum.porzh.me";
database.createLocally = true ;
config = {
dbtype = "sqlite";
adminpassFile="/home/lomig/.config/nextcloud.pass";
};
};
}