♻️ [pi4] Rename default_phone_region and other minor changes in Nextcloud

This commit is contained in:
2025-05-31 16:04:19 +00:00
parent d614495a2c
commit be02be6bf2
2 changed files with 48 additions and 43 deletions

View File

@ -1,8 +1,13 @@
# https://mich-murphy.com/configure-nextcloud-nixos/ # https://mich-murphy.com/configure-nextcloud-nixos/
{ pkgs, config, ... }: {
pkgs,
config,
common,
...
}:
let let
adminPass = "nextcloud/admin-pass"; adminPassKey = "nextcloud/admin-pass";
domain = "beta.nextcloud.martials.no"; domain = "beta.nextcloud.${common.domain}";
dbname = "nextcloud"; dbname = "nextcloud";
dbuser = dbname; dbuser = dbname;
in in
@ -14,14 +19,13 @@ in
autoUpdateApps.enable = true; autoUpdateApps.enable = true;
config = { config = {
adminpassFile = config.sops.secrets.${adminPass}.path; adminpassFile = config.sops.secrets.${adminPassKey}.path;
dbtype = "pgsql"; dbtype = "pgsql";
dbname = dbname; dbname = dbname;
dbuser = dbuser; dbuser = dbuser;
# default directory for postgresql, ensures automatic setup of db # default directory for postgresql, ensures automatic setup of db
dbhost = "/run/postgresql"; dbhost = "/run/postgresql";
adminuser = "admin"; adminuser = "admin";
defaultPhoneRegion = "NO";
}; };
extraApps = { extraApps = {
@ -37,10 +41,11 @@ in
hostName = domain; hostName = domain;
https = true; https = true;
maxUploadSize = "0"; maxUploadSize = "0"; # No max limit
package = pkgs.nextcloud31; package = pkgs.nextcloud31;
settings = { settings = {
default_phone_region = "NO";
trusted_domains = [ trusted_domains = [
domain domain
]; ];
@ -66,7 +71,7 @@ in
}; };
}; };
sops.secrets.${adminPass}.neededForUsers = true; sops.secrets.${adminPassKey}.neededForUsers = true;
# ensure postgresql db is started with nextcloud # ensure postgresql db is started with nextcloud
systemd.services."nextcloud-setup" = { systemd.services."nextcloud-setup" = {