forked from katzen-cafe/katzen-cafe
miau
This commit is contained in:
parent
02a6440717
commit
4353c90e2b
11 changed files with 146 additions and 70 deletions
|
@ -5,5 +5,6 @@
|
|||
./phtanumb-wiki.nix
|
||||
./calckey.nix
|
||||
./penpot.nix
|
||||
./nextcloud.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
database = {
|
||||
type = "mysql";
|
||||
};
|
||||
virtualHost = {
|
||||
httpd.virtualHost = {
|
||||
hostName = "wiki.katzen.cafe";
|
||||
adminAddr = "admin@katzen.cafe";
|
||||
listen = [
|
||||
|
|
64
modules/containers/nextcloud.nix
Normal file
64
modules/containers/nextcloud.nix
Normal file
|
@ -0,0 +1,64 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
containers."nextcloud" = {
|
||||
autoStart = true;
|
||||
privateNetwork = true;
|
||||
hostAddress = "10.0.3.1";
|
||||
localAddress = "10.0.3.2";
|
||||
bindMounts = {
|
||||
"/var/lib/nextcloud" = {
|
||||
hostPath = "/nextcloud/data";
|
||||
isReadOnly = false;
|
||||
};
|
||||
"/var/lib/postgresql" = {
|
||||
hostPath = "/nextcloud/db";
|
||||
isReadOnly = false;
|
||||
};
|
||||
"/var/secret" = {
|
||||
hostPath = "/nextcloud/secret";
|
||||
isReadOnly = true;
|
||||
};
|
||||
};
|
||||
config = { config, pkgs, ... }: {
|
||||
networking.firewall.enable = false;
|
||||
environment.etc."resolv.conf".text = "nameserver 9.9.9.9";
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
https = true;
|
||||
config = {
|
||||
dbtype = "pgsql";
|
||||
dbhost = "/run/postgresql";
|
||||
adminpassFile = "/var/secret/nextcloud-admin-pass";
|
||||
trustedProxies = [ "10.0.3.1" ];
|
||||
};
|
||||
hostName = "wolke.katzen.cafe";
|
||||
package = pkgs.nextcloud27;
|
||||
extraApps = with config.services.nextcloud.package.packages.apps; {
|
||||
inherit bookmarks calendar contacts;
|
||||
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";
|
||||
sha256 = "sha256-s8xr25a40/ot7KDv3Vn7WBm4Pb13LzzK62ZNYufXQ2w";
|
||||
};
|
||||
};
|
||||
};
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = [ "nextcloud" ];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "nextcloud";
|
||||
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
|
||||
}
|
||||
];
|
||||
};
|
||||
system.stateVersion = "23.05";
|
||||
};
|
||||
};
|
||||
deployment.keys = {
|
||||
"nextcloud-admin-pass" = {
|
||||
keyCommand = [ "cat" "/home/jade/keys-tmp/nextcloud-admin-pass" ];
|
||||
destDir = "/nextcloud/secret";
|
||||
permissions = "0604";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -15,7 +15,7 @@
|
|||
depends_on = [ "penpot-postgres" "penpot-redis" ];
|
||||
networks = [ "penpot" ];
|
||||
environment = {
|
||||
"PENPOT_FLAGS" = "enable-registration disable-login disable-login-with-password enable-login-with-oidc";
|
||||
"PENPOT_FLAGS" = "enable-registration disable-login disable-login-with-password enable-login-with-oidc enable-smtp";
|
||||
"PENPOT_PREPL_HOST" = "0.0.0.0";
|
||||
|
||||
"PENPOT_PUBLIC_URI" = "https://design.katzen.cafe";
|
||||
|
@ -35,16 +35,15 @@
|
|||
"PENPOT_OIDC_BASE_URI" = "https://auth.katzen.cafe/realms/katzen.cafe/";
|
||||
#"PENPOT_OIDC_" = "";
|
||||
|
||||
#"PENPOT_SMTP_DEFAULT_FROM" = "Penpot <noreply-pp@schrottkatze.de>";
|
||||
#"PENPOT_SMTP_DEFAULT_REPLY_TO" = "Penpot <noreply-pp@schrottkatze.de>";
|
||||
#"PENPOT_SMTP_HOST" = "smtp.migadu.com";
|
||||
#"PENPOT_SMTP_PORT" = "587";
|
||||
#"PENPOT_SMTP_USERNAME" = "noreply-pp@schrottkatze.de";
|
||||
#"PENPOT_SMTP_PASSWORD" = "${builtins.readFile ../secret-data/penpot-smtp-pass}";
|
||||
#"PENPOT_SMTP_TLS" = "true";
|
||||
#"PENPOT_SMTP_SSL" = "false";
|
||||
"PENPOT_SMTP_DEFAULT_FROM" = "Penpot <noreply@katzen.cafe>";
|
||||
"PENPOT_SMTP_DEFAULT_REPLY_TO" = "Penpot <noreply@katzen.cafe>";
|
||||
"PENPOT_SMTP_HOST" = "mail.katzen.cafe";
|
||||
"PENPOT_SMTP_PORT" = "465";
|
||||
"PENPOT_SMTP_USERNAME" = "noreply@katzen.cafe";
|
||||
"PENPOT_SMTP_TLS" = "true";
|
||||
# "PENPOT_SMTP_SSL" = "true";
|
||||
};
|
||||
env_file = [ "/penpot/secret/oidcPpSecret" ];
|
||||
env_file = [ "/var/lib/secrets/penpot-secrets" ];
|
||||
};
|
||||
"penpot-frontend".service = {
|
||||
image = "penpotapp/frontend:latest";
|
||||
|
@ -84,9 +83,9 @@
|
|||
};
|
||||
};
|
||||
deployment.keys = {
|
||||
"oidcPpSecret" = {
|
||||
keyCommand = [ "cat" "/home/jade/keys-tmp/penpot-keycloak-secret" ];
|
||||
destDir = "/penpot/secret/";
|
||||
"penpot-secrets" = {
|
||||
keyCommand = [ "cat" "/home/jade/keys-tmp/penpot-secrets" ];
|
||||
destDir = "/var/lib/secrets";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue