mirror of
https://forge.katzen.cafe/katzen-cafe/katzen-cafe.git
synced 2024-11-05 15:36:23 +01:00
ein formatter ist passiert
This commit is contained in:
parent
a09be66c28
commit
f40587796a
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
|
||||||
containers."nextcloud" = {
|
containers."nextcloud" = {
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
privateNetwork = true;
|
privateNetwork = true;
|
||||||
|
@ -19,7 +18,11 @@
|
||||||
isReadOnly = true;
|
isReadOnly = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = { config, pkgs, ... }: {
|
config = {
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
networking.firewall.enable = false;
|
networking.firewall.enable = false;
|
||||||
environment.etc."resolv.conf".text = "nameserver 9.9.9.9";
|
environment.etc."resolv.conf".text = "nameserver 9.9.9.9";
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
|
@ -29,13 +32,13 @@
|
||||||
dbtype = "pgsql";
|
dbtype = "pgsql";
|
||||||
dbhost = "/run/postgresql";
|
dbhost = "/run/postgresql";
|
||||||
adminpassFile = "/var/secret/nextcloud-admin-pass";
|
adminpassFile = "/var/secret/nextcloud-admin-pass";
|
||||||
trustedProxies = [ "10.0.3.1" ];
|
trustedProxies = ["10.0.3.1"];
|
||||||
};
|
};
|
||||||
hostName = "wolke.katzen.cafe";
|
hostName = "wolke.katzen.cafe";
|
||||||
package = pkgs.nextcloud27;
|
package = pkgs.nextcloud27;
|
||||||
extraApps = with config.services.nextcloud.package.packages.apps; {
|
extraApps = with config.services.nextcloud.package.packages.apps; {
|
||||||
inherit bookmarks calendar contacts;
|
inherit bookmarks calendar contacts;
|
||||||
user_oidc = pkgs.fetchNextcloudApp rec {
|
user_oidc = pkgs.fetchNextcloudApp rec {
|
||||||
url = "https://github.com/nextcloud-releases/user_oidc/releases/download/v1.3.3/user_oidc-v1.3.3.tar.gz";
|
url = "https://github.com/nextcloud-releases/user_oidc/releases/download/v1.3.3/user_oidc-v1.3.3.tar.gz";
|
||||||
sha256 = "sha256-s8xr25a40/ot7KDv3Vn7WBm4Pb13LzzK62ZNYufXQ2w";
|
sha256 = "sha256-s8xr25a40/ot7KDv3Vn7WBm4Pb13LzzK62ZNYufXQ2w";
|
||||||
};
|
};
|
||||||
|
@ -43,7 +46,7 @@
|
||||||
};
|
};
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ensureDatabases = [ "nextcloud" ];
|
ensureDatabases = ["nextcloud"];
|
||||||
ensureUsers = [
|
ensureUsers = [
|
||||||
{
|
{
|
||||||
name = "nextcloud";
|
name = "nextcloud";
|
||||||
|
@ -56,7 +59,7 @@
|
||||||
};
|
};
|
||||||
deployment.keys = {
|
deployment.keys = {
|
||||||
"nextcloud-admin-pass" = {
|
"nextcloud-admin-pass" = {
|
||||||
keyCommand = [ "pass" "nextcloud/admin-password" ];
|
keyCommand = ["pass" "nextcloud/admin-password"];
|
||||||
destDir = "/nextcloud/secret";
|
destDir = "/nextcloud/secret";
|
||||||
permissions = "0604";
|
permissions = "0604";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
|
||||||
security.acme = {
|
security.acme = {
|
||||||
acceptTerms = true;
|
acceptTerms = true;
|
||||||
defaults = {
|
defaults = {
|
||||||
|
@ -70,7 +69,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.nginx.extraGroups = [ "acme" ];
|
users.users.nginx.extraGroups = ["acme"];
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -91,7 +90,7 @@
|
||||||
};
|
};
|
||||||
"_.katzen.cafe" = {
|
"_.katzen.cafe" = {
|
||||||
# Catchall vhost, will redirect users to HTTPS for all vhosts
|
# Catchall vhost, will redirect users to HTTPS for all vhosts
|
||||||
serverAliases = [ "*.katzen.cafe" ];
|
serverAliases = ["*.katzen.cafe"];
|
||||||
locations."/.well-known/acme-challenge" = {
|
locations."/.well-known/acme-challenge" = {
|
||||||
root = "/var/lib/acme/acme-challenge";
|
root = "/var/lib/acme/acme-challenge";
|
||||||
};
|
};
|
||||||
|
@ -131,12 +130,12 @@
|
||||||
proxyPass = "http://127.0.0.1:3000";
|
proxyPass = "http://127.0.0.1:3000";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
client_max_body_size 8M;
|
client_max_body_size 8M;
|
||||||
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto https;
|
proxy_set_header X-Forwarded-Proto https;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"pad.katzen.cafe" = {
|
"pad.katzen.cafe" = {
|
||||||
|
@ -159,19 +158,19 @@
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.3:8080";
|
proxyPass = "http://127.0.0.3:8080";
|
||||||
# proxy_set_header Host $host;
|
# proxy_set_header Host $host;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
proxy_buffers 4 256k;
|
proxy_buffers 4 256k;
|
||||||
proxy_buffer_size 128k;
|
proxy_buffer_size 128k;
|
||||||
proxy_busy_buffers_size 256k;
|
proxy_busy_buffers_size 256k;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
proxy_set_header X-Forwarded-For $proxy_protocol_addr;
|
proxy_set_header X-Forwarded-For $proxy_protocol_addr;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
#extraConfig = ''
|
#extraConfig = ''
|
||||||
#'';
|
#'';
|
||||||
};
|
};
|
||||||
"design.katzen.cafe" = {
|
"design.katzen.cafe" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
@ -203,7 +202,7 @@
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
|
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue