cleanup
This commit is contained in:
parent
07ec8df992
commit
c2c5e2c070
11 changed files with 135 additions and 113 deletions
|
|
@ -34,5 +34,4 @@ systemd.services.calibre-web = {
|
|||
CacheDirectory = "calibre-web";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@ sudo systemctl stop phpfm-nextcloud
|
|||
sudo systemctl stop redis-nextcloud
|
||||
sudo rm -rf /var/lib/nextcloud
|
||||
#sudo rm -rf /var/lib/postgresql
|
||||
#sudo rm -rf /var/lib/redis-nextcloud
|
||||
sudo rm -rf /var/lib/redis-nextcloud
|
||||
|
|
|
|||
|
|
@ -1,15 +1,62 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
|
||||
# BASIC CONFIG
|
||||
# user is root
|
||||
environment.etc."nextcloud-admin-pass".text = "CHANGE_RIGHT_AWAY";
|
||||
|
||||
/*
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud31;
|
||||
hostName = "nextcloud.knossos";
|
||||
config.adminpassFile = "/var/lib/nextcloud-admin-pass";
|
||||
config.dbtype = "sqlite";
|
||||
hostName = "localhost";
|
||||
config.adminpassFile = "/etc/nextcloud-admin-pass";
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
configureRedis = true;
|
||||
package = pkgs.nextcloud31;
|
||||
hostName = "nextcloud.knossos";
|
||||
# datadir = "/var/lib/nextcloud/";
|
||||
settings = {
|
||||
overwriteprotocol = "https";
|
||||
trusted_proxies = [ "localhost" "127.0.0.1" "100.82.24.89" ];
|
||||
trusted_domains = [ "nextcloud.knossos.arkadi.one" ];
|
||||
};
|
||||
config = {
|
||||
dbtype = "pgsql";
|
||||
dbuser = "nextcloud";
|
||||
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
|
||||
dbname = "nextcloud";
|
||||
adminpassFile = "/etc/nextcloud-admin-pass";
|
||||
adminuser = "admin";
|
||||
};
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = [ "nextcloud" ];
|
||||
ensureUsers = [
|
||||
{ name = "nextcloud";
|
||||
ensureDBOwnership = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."nextcloud.knossos".listen = [ { addr = "127.0.0.1"; port = 8009; } ];
|
||||
# ensure that postgres is running *before* running the setup
|
||||
systemd.services."nextcloud-setup" = {
|
||||
requires = ["postgresql.service"];
|
||||
after = ["postgresql.service"];
|
||||
};
|
||||
|
||||
|
||||
# CALIBRE-WEB already disabled?
|
||||
|
||||
# services.nginx.enable = true;
|
||||
# services.nginx.virtualHosts."nextcloud.knossos" ={
|
||||
# listen = [ { addr = "127.0.0.1"; port = 8009; } ];
|
||||
# forceSSL = false;
|
||||
# };
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,12 +16,12 @@ services.nextcloud = {
|
|||
dbuser = "nextcloud";
|
||||
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
|
||||
dbname = "nextcloud";
|
||||
adminpassFile = "/var/lib/secrets/nextcloud-admin-pass";
|
||||
adminpassFile = "/var/lib/secrets/nextcloud/nextcloud-admin-pass";
|
||||
adminuser = "admin";
|
||||
};
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = [ "nextcloud" ];
|
||||
ensureUsers = [
|
||||
|
|
@ -29,14 +29,20 @@ services.postgresql = {
|
|||
ensureDBOwnership = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# ensure that postgres is running *before* running the setup
|
||||
systemd.services."nextcloud-setup" = {
|
||||
# ensure that postgres is running *before* running the setup
|
||||
systemd.services."nextcloud-setup" = {
|
||||
requires = ["postgresql.service"];
|
||||
after = ["postgresql.service"];
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."nextcloud.knossos".listen = [ { addr = "127.0.0.1"; port = 8009; } ];
|
||||
# CALIBRE-WEB already disabled?
|
||||
|
||||
# services.nginx.enable = true;
|
||||
# services.nginx.virtualHosts."nextcloud.knossos" ={
|
||||
# listen = [ { addr = "127.0.0.1"; port = 8009; } ];
|
||||
# forceSSL = false;
|
||||
# };
|
||||
|
||||
}
|
||||
15
services/oldnextcloud.nix
Normal file
15
services/oldnextcloud.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud31;
|
||||
hostName = "nextcloud.knossos";
|
||||
config.adminpassFile = "/var/lib/nextcloud-admin-pass";
|
||||
config.dbtype = "sqlite";
|
||||
};
|
||||
|
||||
|
||||
services.nginx.virtualHosts."nextcloud.knossos".listen = [ { addr = "127.0.0.1"; port = 8009; } ];
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue