From 9fea252f2c5fdc7a16eba85bbc5488463964f5a2 Mon Sep 17 00:00:00 2001 From: Kabbone Date: Sat, 13 Jan 2024 12:25:14 +0100 Subject: [PATCH] hosts: server: enable postgres for onlyoffice --- modules/services/server/nextcloud.nix | 8 ++++++++ modules/services/server/postgresql.nix | 1 + secrets/secrets.nix | 1 + secrets/services/nextcloud/onlyofficedb.age | 21 ++++++++++++++++++++ secrets/services/postgresql/initScript.age | Bin 2949 -> 3110 bytes 5 files changed, 31 insertions(+) create mode 100644 secrets/services/nextcloud/onlyofficedb.age diff --git a/modules/services/server/nextcloud.nix b/modules/services/server/nextcloud.nix index 2f993d2..e76f7ac 100644 --- a/modules/services/server/nextcloud.nix +++ b/modules/services/server/nextcloud.nix @@ -46,6 +46,10 @@ services.onlyoffice = { enable = true; hostname = "localhost"; + postgresName = "onlyofficedb"; + postgresHost = "localhost"; + postgresUser = "onlyoffice"; + postgresPasswordFile = config.age.secrets."services/nextcloud/onlyofficedb".path; }; services.redis = { @@ -78,6 +82,10 @@ file = ../../../secrets/services/nextcloud/adminpassFile.age; owner = "nextcloud"; }; + age.secrets."services/nextcloud/onlyofficedb" = { + file = ../../../secrets/services/nextcloud/onlyofficedb.age; + owner = "onlyoffice"; + }; systemd.services."nextcloud-setup" = { requires = ["postgresql.service"]; diff --git a/modules/services/server/postgresql.nix b/modules/services/server/postgresql.nix index 86e8fcd..21f278e 100644 --- a/modules/services/server/postgresql.nix +++ b/modules/services/server/postgresql.nix @@ -29,6 +29,7 @@ host whatsappdb mautrixwa localhost scram-sha-256 host telegramdb mautrixtele localhost scram-sha-256 host signaldb mautrixsignal localhost scram-sha-256 + host onlyofficedb onlyoffice localhost scram-sha-256 ''; initialScript = config.age.secrets."services/postgresql/initScript.sql".path; }; diff --git a/secrets/secrets.nix b/secrets/secrets.nix index f504538..d36b77f 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -62,6 +62,7 @@ in "services/matrix/signal-registration.age".publicKeys = servers ++ users; "services/nextcloud/adminpassFile.age".publicKeys = servers ++ users; "services/nextcloud/dbpassFile.age".publicKeys = servers ++ users; + "services/nextcloud/onlyofficedb.age".publicKeys = servers ++ users; "services/gitea/databasePassword.age".publicKeys = servers ++ users; "services/gitea/mailerPassword.age".publicKeys = servers ++ users; "services/gitea/runner-token.age".publicKeys = dmzs ++ users; diff --git a/secrets/services/nextcloud/onlyofficedb.age b/secrets/services/nextcloud/onlyofficedb.age new file mode 100644 index 0000000..98ed85a --- /dev/null +++ b/secrets/services/nextcloud/onlyofficedb.age @@ -0,0 +1,21 @@ +age-encryption.org/v1 +-> ssh-ed25519 neExcQ ua8fTpZB6AlfOtoDVlTUPIAg8aPoi79AJVHyS6quMUM +4EC2U+h2OmwB4iQc5zA+OvQeQn/RJGgpfUl9vxB1O+o +-> ssh-rsa VtjGpQ +ioqNl02pKSYBd6jAR27FgxsPoOJy4HOcAVjzPlPF18EhHVVPkDSggeElOwJ7Kb33 +XEkFpKiSz+Chcn+KrQBW3yYwYGwIMYkrs6xfmYrD1RKxdAbIXNophQJPA6HkYj6Z +UIK4xfwGDhfEdu/9+UXI8hfQ7YidvVw+NujavBhgpZjfa1E4K1ZbpsGTqqxWkPjp +GTI+PoCqsxJNzi2CyNaHmiz3ykOTc6V9CQUA9Yr4GDyol+LkMs1EYEHZQ4yY+p/Z +ZBOFFTmHlP+xKMhjK67Lr1PNDeNgFTzIY8aJIdhC9ScY6fqJ08IftwEHrgWYr1R0 +EIkQ9hCJK49mHPMVlJFLMZI+xmoRIalf68//Q4ZTVdNaLmAHQRIQfQC/YrCddITx +3GmkLRGz4wrvuWLcgx8DhOfe5vr/Tu+SI5oVIpkScxgzU8bHYsyrVQ0TAFOOLyx+ +DQNFhd2aY0lUzZfyble5fOozeqonPf+k74vPn6CvikDdeTNhpj8Cbe9Ro7dQBO0N +0a11ZBGlm5nohGootIP/zi4ly6xpc0cUq1PbFpq3xV3rXX2VUsPfAhHqlkc/Rsi7 +/7JkG4+3+xH0vAGvPFs7Ja1snnWuWeK6s2v+KR0ijvYRaFp9KuDwoobW0tY5KaxM +2NWzltzdYJ3gINYTqDa+zmZIdZr5rEh01q43uRQ451w +-> piv-p256 grR75w A6t18C3KM2Z3De6Rnzs+eGLzAe5bGUqOG7NCMa0Nsgri +Hb8o3YbHz4xjU4NZNuUa9UigU47eKh1mRo2dlgXV4FM +-> piv-p256 RQguQQ A27FNpG0FCPnDskBHG7fQjZCzJQ/j5ViKbVYzRDCXJlQ +nSgHWpdnisqCHmpdtwcbr2J1AxkTW8vxO5Aillyoyig +--- gPm97DAXfRTOmb9G/Pfbty2XnFAgzqR9ldNEaflZa+8 +\oIzW+fh_Iu  ؙhj] Ӳ`WE N \ No newline at end of file diff --git a/secrets/services/postgresql/initScript.age b/secrets/services/postgresql/initScript.age index 7321276d4080e52de17bf4a07c4a8de33407fdb5..905e1d32909da10b91c3be7e79852544784408e0 100644 GIT binary patch literal 3110 zcmY+C`CrTl1IMu`CK2gC(n-u_uIBh|X`B0KrfHh1?;y>6AI>6%Q9n_ zX1XmNUU79DHAD===WI4Mi*Hl(UCbghDJLQ83^6bq3kmebWZ zkVcacA&{E{q>6PgB?}viOaoM0g@9!T&;+#F=0-{>VyBy#i8Zm^B)*e_Ou^_>Yz5k> zNaoSCZYxQ}aAMI(Iw}LrhrvOL6zP_lj2vT{43()v03sq^C3k{0ErlYdyO?AEip1c zBgw>vvkgi;N8@H0Oo-G}rGyEflW2UvlB{8}n2=Hmhh>5o3c+mCDyT*yhso2bG)XBa zOOnkF2^^4^Vl;DHC_K&WmP=D87#UoT)}g3KGus8XQ>;b-34)=p8mdJ_O0t6@of_cM zXc`HP$N@D@x|*X$qD3y^7kyk1$7VS+M3RFh!^dLWTqcf%g{LuDBppmo2bDBHkfJ~u zxaK4Vi7wY_kSY+PkY&jjS~ecxbn+b#&gIl{ZS+h6BqPeiU#7qj5;9 zN@!x)Z8{7Y5OZBj3|^6pOJi8gc$3gdlwplzHAe!N5O~!WtwxN>$x+}rE{xfd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