diff options
Diffstat (limited to 'ymir.nix')
-rw-r--r-- | ymir.nix | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -1159,4 +1159,37 @@ in rec { | |||
1159 | }; | 1159 | }; |
1160 | 1160 | ||
1161 | services.qemuGuest.enable = true; | 1161 | services.qemuGuest.enable = true; |
1162 | |||
1163 | services.nextcloud = { | ||
1164 | enable = true; | ||
1165 | hostName = "cloud.141.li"; | ||
1166 | config = { | ||
1167 | dbtype = "pgsql"; | ||
1168 | dbuser = "nextcloud"; | ||
1169 | dbhost = "/run/postgresql"; | ||
1170 | dbname = "nextcloud"; | ||
1171 | adminpassFile = "/etc/nextcloud-admin-pass"; | ||
1172 | adminuser = "root"; | ||
1173 | }; | ||
1174 | }; | ||
1175 | |||
1176 | services.postgresql = { | ||
1177 | enable = true; | ||
1178 | ensureDatabases = [ "nextcloud" ]; | ||
1179 | ensureUsers = [ | ||
1180 | { name = "nextcloud"; | ||
1181 | ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES"; | ||
1182 | } | ||
1183 | ]; | ||
1184 | }; | ||
1185 | |||
1186 | services.nginx.virtualHosts."cloud.141.li" = { | ||
1187 | forceSSL = true; | ||
1188 | enableACME = true; | ||
1189 | }; | ||
1190 | |||
1191 | systemd.services."nextcloud-setup" = { | ||
1192 | requires = ["postgresql.service"]; | ||
1193 | after = ["postgresql.service"]; | ||
1194 | }; | ||
1162 | } | 1195 | } |