-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Will be running under `pretix.{dev.,}chaos.jetzt` and be pre-configured to allow for serving the chaos.jetzt organisation under `tickets.{dev.,}chaos.jetzt`. To keep currently running sales, `tickets.chaos.jetzt/jetzt5` will continue redirecting to tickets.chaostreff-flensburg.de Close #37 as implemented.
- Loading branch information
Showing
4 changed files
with
70 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ baseDomain, isDev, config, ... }: | ||
|
||
let | ||
domain = "pretix.${baseDomain}"; | ||
in { | ||
sops.secrets.pretix_env = {}; | ||
|
||
services.pretix = { | ||
enable = true; | ||
environmentFile = config.sops.secrets.pretix_env.path; | ||
settings = { | ||
pretix = { | ||
instance_name = domain; | ||
url = "https://${domain}"; | ||
currency = "EUR"; | ||
loglevel = if isDev then "INFO" else "WARNING"; | ||
plugins_default = "pretix.plugins.sendmail,pretix.plugins.statistics,pretix.plugins.ticketoutputpdf"; | ||
plugins_exclude = "pretix.plugins.paypal,pretix.plugins.paypal2,pretix.plugins.stripe,pretix.plugins.banktransfer"; | ||
audit_comments = true; | ||
obligatory_2fa = true; | ||
trust_x_forwarded_for = true; | ||
trust_x_forwarded_proto = true; | ||
trust_x_forwarded_host = true; | ||
}; | ||
locale = { | ||
default = "de-informal"; | ||
timezone = "Europe/Berlin"; | ||
}; | ||
database = { | ||
backend = "postgresql"; | ||
name = "pretix"; | ||
user = "pretix"; | ||
}; | ||
mail = { | ||
from = "[email protected]"; | ||
# environmentFile contains user, password, host, port, tls and ssl options | ||
admins = "[email protected]"; | ||
}; | ||
django = { | ||
# PRETIX_DJANGO_SECRET contained in environmentFile | ||
debug = false; | ||
}; | ||
languages = { | ||
enabled = "en,de-informal"; | ||
}; | ||
}; | ||
|
||
database.createLocally = true; | ||
nginx = { | ||
inherit domain; | ||
enable = true; | ||
}; | ||
}; | ||
|
||
services.nginx = { | ||
enable = true; | ||
virtualHosts."${domain}" = { | ||
serverAliases = [ "tickets.${baseDomain}" ]; | ||
enableACME = true; | ||
forceSSL = true; | ||
locations."/".recommendedProxySettings = true; | ||
locations."/jetzt5".return = "307 https://tickets.chaostreff-flensburg.de/chaos.jetzt/jetzt5"; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters