diff options
-rw-r--r-- | ymir.nix | 58 |
1 files changed, 1 insertions, 57 deletions
@@ -7,7 +7,7 @@ let | |||
7 | luaPosix = pkgs.callPackage ./custom/luaPosix.nix {}; | 7 | luaPosix = pkgs.callPackage ./custom/luaPosix.nix {}; |
8 | luaSha2 = pkgs.callPackage ./custom/luaSha2.nix {}; | 8 | luaSha2 = pkgs.callPackage ./custom/luaSha2.nix {}; |
9 | myDomains = [ "dirty-haskell.org" "www.dirty-haskell.org" "lists.dirty-haskell.org" "l.dirty-haskell.org" | 9 | myDomains = [ "dirty-haskell.org" "www.dirty-haskell.org" "lists.dirty-haskell.org" "l.dirty-haskell.org" |
10 | "cloud.141.li" "online.141.li" "o.141.li" "ftp.141.li" "files.141.li" "f.141.li" "ymir.141.li" "141.li" "www.141.li" "lists.141.li" "l.141.li" "rpg.141.li" "odin.141.li" | 10 | "online.141.li" "o.141.li" "ftp.141.li" "files.141.li" "f.141.li" "ymir.141.li" "141.li" "www.141.li" "lists.141.li" "l.141.li" "rpg.141.li" "odin.141.li" |
11 | "ymir.xmpp.li" "xmpp.li" "www.xmpp.li" "lists.xmpp.li" "l.xmpp.li" "muc.xmpp.li" "proxy.xmpp.li" | 11 | "ymir.xmpp.li" "xmpp.li" "www.xmpp.li" "lists.xmpp.li" "l.xmpp.li" "muc.xmpp.li" "proxy.xmpp.li" |
12 | "online.yggdrasil.li" "o.yggdrasil.li" "ftp.yggdrasil.li" "files.yggdrasil.li" "f.yggdrasil.li" "ymir.yggdrasil.li" "git.yggdrasil.li" "www.yggdrasil.li" "yggdrasil.li" "lists.yggdrasil.li" "l.yggdrasil.li" "rpg.yggdrasil.li" "odin.yggdrasil.li" | 12 | "online.yggdrasil.li" "o.yggdrasil.li" "ftp.yggdrasil.li" "files.yggdrasil.li" "f.yggdrasil.li" "ymir.yggdrasil.li" "git.yggdrasil.li" "www.yggdrasil.li" "yggdrasil.li" "lists.yggdrasil.li" "l.yggdrasil.li" "rpg.yggdrasil.li" "odin.yggdrasil.li" |
13 | "online.praseodym.org" "o.praseodym.org" "ftp.praseodym.org" "files.praseodym.org" "f.praseodym.org" "ymir.praseodym.org" "praseodym.org" "www.praseodym.org" "lists.praseodym.org" "l.praseodym.org" "rpg.praseodym.org" | 13 | "online.praseodym.org" "o.praseodym.org" "ftp.praseodym.org" "files.praseodym.org" "f.praseodym.org" "ymir.praseodym.org" "praseodym.org" "www.praseodym.org" "lists.praseodym.org" "l.praseodym.org" "rpg.praseodym.org" |
@@ -1159,60 +1159,4 @@ in rec { | |||
1159 | }; | 1159 | }; |
1160 | 1160 | ||
1161 | services.qemuGuest.enable = true; | 1161 | services.qemuGuest.enable = true; |
1162 | |||
1163 | services.nextcloud = { | ||
1164 | enable = true; | ||
1165 | package = pkgs.nextcloud20; | ||
1166 | hostName = "cloud.141.li"; | ||
1167 | config = { | ||
1168 | dbtype = "pgsql"; | ||
1169 | dbuser = "nextcloud"; | ||
1170 | dbhost = "/run/postgresql"; | ||
1171 | dbname = "nextcloud"; | ||
1172 | adminpassFile = "/etc/nextcloud-admin-pass"; | ||
1173 | adminuser = "root"; | ||
1174 | }; | ||
1175 | }; | ||
1176 | |||
1177 | services.postgresql = { | ||
1178 | enable = true; | ||
1179 | package = pkgs.postgresql_13; | ||
1180 | ensureDatabases = [ "nextcloud" ]; | ||
1181 | ensureUsers = [ | ||
1182 | { name = "nextcloud"; | ||
1183 | ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES"; | ||
1184 | } | ||
1185 | ]; | ||
1186 | }; | ||
1187 | |||
1188 | services.nginx.virtualHosts."cloud.141.li" = { | ||
1189 | forceSSL = true; | ||
1190 | useACMEHost = "yggdrasil.li"; | ||
1191 | acmeRoot = security.acme.certs."yggdrasil.li".webroot; | ||
1192 | }; | ||
1193 | |||
1194 | systemd.services."nextcloud-setup" = { | ||
1195 | requires = ["postgresql.service"]; | ||
1196 | after = ["postgresql.service"]; | ||
1197 | }; | ||
1198 | |||
1199 | systemd.services."nextcloud-send-event-reminders" = | ||
1200 | let cfg = config.services.nextcloud; | ||
1201 | fpm = config.services.phpfpm.pools.nextcloud; | ||
1202 | in { environment = { | ||
1203 | inherit (fpm.phpEnv) NEXTCLOUD_CONFIG_DIR; | ||
1204 | }; | ||
1205 | serviceConfig.Type = "oneshot"; | ||
1206 | serviceConfig.User = "nextcloud"; | ||
1207 | serviceConfig.ExecStart = "${fpm.phpPackage}/bin/php -f ${cfg.package}/cron.php"; | ||
1208 | }; | ||
1209 | systemd.timers."nextcloud-send-event-reminders" = { | ||
1210 | wantedBy = [ "timers.target" ]; | ||
1211 | timerConfig.OnBootSec = "5m"; | ||
1212 | timerConfig.OnUnitActiveSec = "30s"; | ||
1213 | timerConfig.Unit = "nextcloud-send-event-reminders.service"; | ||
1214 | }; | ||
1215 | systemd.timers."nextcloud-cron" = { | ||
1216 | timerConfig.OnUnitActiveSec = lib.mkForce "5m"; | ||
1217 | }; | ||
1218 | } | 1162 | } |