Add nextcloud host
This commit is contained in:
parent
093a44edf4
commit
0a5d070773
|
@ -38,6 +38,10 @@ in
|
|||
hostNixpkgs = nixpkgs-unstable;
|
||||
site = "vs";
|
||||
};
|
||||
nextcloud = {
|
||||
hostNixpkgs = nixpkgs-unstable;
|
||||
site = "vs";
|
||||
};
|
||||
nitter = {
|
||||
site = "vs";
|
||||
};
|
||||
|
|
17
hosts/nextcloud/configuration.nix
Normal file
17
hosts/nextcloud/configuration.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ ... }:
|
||||
{
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/vda";
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "nextcloud";
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 80 443 8443 ];
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
7
hosts/nextcloud/default.nix
Normal file
7
hosts/nextcloud/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./nextcloud.nix
|
||||
];
|
||||
}
|
38
hosts/nextcloud/nextcloud.nix
Normal file
38
hosts/nextcloud/nextcloud.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud27;
|
||||
hostName = "cloud.nekover.se";
|
||||
https = true;
|
||||
config = {
|
||||
dbtype = "pgsql";
|
||||
adminpassFile = "/secrets/nextcloud-adminpass.secret";
|
||||
defaultPhoneRegion = "DE";
|
||||
};
|
||||
database.createLocally = true;
|
||||
configureRedis = true;
|
||||
extraAppsEnable = true;
|
||||
extraApps = with config.services.nextcloud.package.packages.apps; {
|
||||
inherit bookmarks contacts calendar tasks twofactor_webauthn;
|
||||
};
|
||||
maxUploadSize = "16G";
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts.${config.services.nextcloud.hostName} = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
listen = [
|
||||
{
|
||||
addr = "localhost";
|
||||
port = 1234;
|
||||
} # workaround for enableACME check
|
||||
{
|
||||
addr = "0.0.0.0";
|
||||
port = 8443;
|
||||
ssl = true;
|
||||
proxyProtocol = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
11
hosts/nextcloud/secrets.nix
Normal file
11
hosts/nextcloud/secrets.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
{
|
||||
deployment.keys."nextcloud-adminpass.secret" = {
|
||||
keyCommand = [ "env" "GNUPGHOME=/home/yuri/.passinfra_gnupg" "PASSWORD_STORE_DIR=/home/yuri/pass/infra" "pass" "nextcloud/adminpass" ];
|
||||
destDir = "/secrets";
|
||||
user = "nextcloud";
|
||||
group = "nextcloud";
|
||||
permissions = "0640";
|
||||
uploadAt = "pre-activation";
|
||||
};
|
||||
}
|
|
@ -11,6 +11,7 @@
|
|||
map $ssl_preread_server_name $address {
|
||||
anisync.grzb.de 127.0.0.1:8443;
|
||||
birdsite.nekover.se 127.0.0.1:8443;
|
||||
cloud.nekover.se 10.202.41.122:8443;
|
||||
element.nekover.se 127.0.0.1:8443;
|
||||
gameserver.grzb.de 127.0.0.1:8443;
|
||||
git.grzb.de 127.0.0.1:8443;
|
||||
|
@ -21,7 +22,6 @@
|
|||
nextcloud.grzb.de 127.0.0.1:8443;
|
||||
nix-cache.nekover.se 10.202.41.121:8443;
|
||||
social.nekover.se 127.0.0.1:8443;
|
||||
test.grzb.de 127.0.0.1:8443;
|
||||
}
|
||||
|
||||
server {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
proxyProtocol = true;
|
||||
}];
|
||||
locations."/" = {
|
||||
proxyPass = "http://nextcloud.vs.grzb.de:80";
|
||||
proxyPass = "http://nextcloud-grzb.vs.grzb.de:80";
|
||||
};
|
||||
locations."= /.well-known/carddav" = {
|
||||
return = "301 $scheme://$host/remote.php/dav";
|
||||
|
|
Loading…
Reference in a new issue