Skip to content

Commit

Permalink
modules (nextcloud): Connect to postgres running on warehouse
Browse files Browse the repository at this point in the history
  • Loading branch information
britter committed Jul 10, 2024
1 parent 4b93c98 commit ffef1bc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/nixos/nextcloud/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
config,
lib,
pkgs,
inputs,
...
}: let
cfg = config.my.modules.nextcloud;
Expand All @@ -15,13 +16,21 @@ in {
owner = "nextcloud";
};

sops.secrets."postgresql/nextcloud-user-password" = {
restartUnits = ["nginx.service"];
sopsFile = "${toString inputs.self}/systems/_shared-secrets/warehouse/cyberoffice-secrets.yaml";
};

services.nextcloud = {
enable = true;
package = pkgs.nextcloud29;
hostName = "nextcloud.ritter.family";
https = true;
config = {
adminpassFile = config.sops.secrets."nextcloud/admin-pass".path;
dbtype = "pgsql";
dbpassFile = config.sops.secrets."postgresql/nextcloud-user-password".path;
dbhost = "${config.my.homelab.warehouse.ip}:5432";
};
extraApps = {
inherit (config.services.nextcloud.package.packages.apps) bookmarks calendar contacts richdocuments;
Expand Down

0 comments on commit ffef1bc

Please sign in to comment.