Merge pull request 'add next-cloud' (#69) from leon/nix-config:vps-leon into master

Reviewed-on: #69
This commit is contained in:
astro 2022-09-28 19:24:28 +02:00
commit d5626ebc4c
1 changed files with 34 additions and 0 deletions

View File

@ -77,6 +77,40 @@
];
};
};
#------------------End----------------------------
#------------------next-cloud---------------------
services.nextcloud = {
enable = true;
hostName = "next-cloud";
config = {
dbtype = "pgsql";
dbuser = "nextcloud";
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
dbname = "nextcloud";
adminpassFile = "/etc/nixos/next-cloud/pass";
adminuser = "root";
extraTrustedDomains = [ "172.20.79.254" "10.10.11.4" ];
};
};
services.postgresql = {
enable = true;
ensureDatabases = [ "nextcloud" ];
ensureUsers = [
{ name = "nextcloud";
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
}
];
};
# ensure that postgres is running *before* running the setup
systemd.services."nextcloud-setup" = {
requires = ["postgresql.service"];
after = ["postgresql.service"];
};
#------------------End----------------------------
system.stateVersion = "22.05";
}