fixing nextcloud

This commit is contained in:
Ingolf Wagner 2021-03-03 06:45:08 +01:00
parent 27ba1de18d
commit abcef8d92f
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
3 changed files with 17 additions and 10 deletions

View file

@ -12,7 +12,7 @@
services.mysqlBackup = { services.mysqlBackup = {
enable = true; enable = true;
databases = [ "property" ]; databases = [ "property" ];
user = "admin"; #user = "admin";
}; };
backup.dirs = [ config.services.mysqlBackup.location ]; backup.dirs = [ config.services.mysqlBackup.location ];

View file

@ -175,6 +175,9 @@ in {
''; '';
}; };
# in php
services.phpfpm.phpPackage = pkgs.php73;
# nextcloud setup # nextcloud setup
services.nextcloud = { services.nextcloud = {
enable = true; enable = true;
@ -194,20 +197,27 @@ in {
#logLevel = 0; #logLevel = 0;
https = true; https = true;
config = { config = {
adminpassFile = toString <secrets/nextcloud/root_password>; adminpassFile =
toString config.krops.userKeys."nextcloud_root".target;
overwriteProtocol = "https"; overwriteProtocol = "https";
trustedProxies = [ "195.201.134.247" hostAddress ]; trustedProxies = [ "195.201.134.247" hostAddress ];
dbtype = "mysql"; dbtype = "mysql";
dbpassFile = toString config.krops.userKeys."nextcloud".target; dbpassFile =
toString config.krops.userKeys."nextcloud_database".target;
dbport = 3306; dbport = 3306;
}; };
}; };
# provide password file for database with proper rights # provide password file for database with proper rights
krops.userKeys."nextcloud" = { krops.userKeys."nextcloud_database" = {
user = "nextcloud"; user = "nextcloud";
source = toString <secrets/nextcloud/database_password>; source = toString <secrets/nextcloud/database_password>;
requiredBy = [ "nginx.service" ]; requiredBy = [ "nginx.service" "nextcloud-setup.service" ];
};
krops.userKeys."nextcloud_root" = {
user = "nextcloud";
source = toString <secrets/nextcloud/root_password>;
requiredBy = [ "nginx.service" "nextcloud-setup.service" ];
}; };
environment.systemPackages = [ pkgs.smbclient ]; environment.systemPackages = [ pkgs.smbclient ];
@ -238,10 +248,7 @@ in {
recommendedProxySettings = true; recommendedProxySettings = true;
virtualHosts = { virtualHosts = {
"nextcloud.workhorse.private" = { "nextcloud.workhorse.private" = {
serverAliases = [ serverAliases = [ "nextcloud.ingolf-wagner.de" ];
"nextcloud.ingolf-wagner.de"
# "nextcloud.gaykraft.com"
];
locations."/" = { locations."/" = {
proxyPass = "http://${containerAddress}"; proxyPass = "http://${containerAddress}";
extraConfig = '' extraConfig = ''

View file

@ -96,7 +96,7 @@ let
#kops-lib.file = toString ~/dev/krops-lib; #kops-lib.file = toString ~/dev/krops-lib;
krops-lib.git = { krops-lib.git = {
url = "https://git.ingolf-wagner.de/nix-modules/krops.git"; url = "https://git.ingolf-wagner.de/nix-modules/krops.git";
ref = "1.0.2"; ref = "1.0.3";
}; };
#cluster-module.file = toString ~/dev/cluster-module; #cluster-module.file = toString ~/dev/cluster-module;