chore(nix): add nextcloud age permissions

This commit is contained in:
Serĉanto de Scio 2024-08-24 01:34:35 +10:00
parent fcf7fb956c
commit d2318bae7c
Signed by: sercanto
GPG key ID: A4122FF3971B6865

View file

@ -1,11 +1,26 @@
# NixOps configuration for the hosts running Nextcloud # NixOps configuration for the hosts running Nextcloud
{ {
age ? config.age,
config, config,
pkgs, pkgs,
lib, lib,
... ...
}: { }: {
age.secrets = {
nextcloud-dbpass = {
file = ../../secrets/nextcloud-dbpass.age;
path = "/run/keys/nextcloud-dbpass";
mode = "0640";
owner = "nextcloud";
group = "nextcloud";
};
nextcloud-adminpass = {
file = ../../secrets/nextcloud-adminpass.age;
path = "/run/keys/nextcloud-adminpass";
mode = "0640";
owner = "nextcloud";
group = "nextcloud";
};
};
services.nextcloud = { services.nextcloud = {
enable = true; # Enable Nextcloud enable = true; # Enable Nextcloud
hostName = "cloud.mcwhirter.io"; # FQDN for the Nextcloud instance hostName = "cloud.mcwhirter.io"; # FQDN for the Nextcloud instance
@ -16,8 +31,8 @@
dbname = "nextcloud"; # Set the database name dbname = "nextcloud"; # Set the database name
dbhost = "/run/postgresql"; # Set the database connection dbhost = "/run/postgresql"; # Set the database connection
dbuser = "nextcloud"; # Set the database user dbuser = "nextcloud"; # Set the database user
dbpassFile = age.secrets.nextcloud.dbpass; # Where to find the database password dbpassFile = config.age.secrets.nextcloud-dbpass.path;
adminpassFile = age.secrets.nextcloud.adminpass; # Where to find the admin password adminpassFile = config.age.secrets.nextcloud-adminpass.path;
adminuser = "root"; # Set the admin user name adminuser = "root"; # Set the admin user name
}; };
autoUpdateApps = { autoUpdateApps = {