feat: nextcloud initial commit

This commit is contained in:
Benjamin Bädorf 2023-10-28 02:46:38 +02:00
parent 6cf680a2df
commit f59662b6c8
No known key found for this signature in database
GPG key ID: 1B7BF5B77A521346
2 changed files with 38 additions and 0 deletions

View file

@ -4,6 +4,7 @@
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./nextcloud.nix
];
# Use GRUB2 as the boot loader.

View file

@ -0,0 +1,37 @@
{ config, pkgs, ... }:
{
services.caddy.virtualHosts."cloud.pub.solar" = {
# logFormat = lib.mkForce ''
# output discard
# '';
extraConfig = ''
reverse_proxy :8080
'';
};
services.nginx.virtualHosts."localhost".listen = [ { addr = "127.0.0.1"; port = 8080; } ];
services.nextcloud = {
enable = true;
https = true;
secretFile = ""; # secret
notify_push = {
enable = true;
};
config = {
adminuser = "admin";
dbuser = "nextcloud";
dbtype = "pgsql";
dbname = "nextcloud";
dbtableprefix = "oc_";
trustedProxies = [
"cloud.pub.solar"
];
};
autoUpdateApps.enable = true;
database.createLocally = true;
};
}