]>
Commit | Line | Data |
---|---|---|
20e1428f | 1 | { env, mastodon }: |
35a397cd IB |
2 | let |
3 | varDir = "/var/lib/mastodon_immae"; | |
4 | socketsDir = "/run/mastodon"; | |
32c84ff8 IB |
5 | keys.mastodon = { |
6 | dest = "webapps/tools-mastodon"; | |
50933a04 IB |
7 | user = "mastodon"; |
8 | group = "mastodon"; | |
9 | permissions = "0400"; | |
10 | text = '' | |
11 | REDIS_HOST=${env.redis.host} | |
12 | REDIS_PORT=${env.redis.port} | |
13 | REDIS_DB=${env.redis.db} | |
14 | DB_HOST=${env.postgresql.socket} | |
15 | DB_USER=${env.postgresql.user} | |
16 | DB_NAME=${env.postgresql.database} | |
17 | DB_PASS=${env.postgresql.password} | |
18 | DB_PORT=${env.postgresql.port} | |
35a397cd | 19 | |
50933a04 IB |
20 | LOCAL_DOMAIN=mastodon.immae.eu |
21 | LOCAL_HTTPS=true | |
22 | ALTERNATE_DOMAINS=immae.eu | |
35a397cd | 23 | |
50933a04 IB |
24 | PAPERCLIP_SECRET=${env.paperclip_secret} |
25 | SECRET_KEY_BASE=${env.secret_key_base} | |
26 | OTP_SECRET=${env.otp_secret} | |
35a397cd | 27 | |
50933a04 IB |
28 | VAPID_PRIVATE_KEY=${env.vapid.private} |
29 | VAPID_PUBLIC_KEY=${env.vapid.public} | |
35a397cd | 30 | |
50933a04 IB |
31 | SMTP_DELIVERY_METHOD=sendmail |
32 | SMTP_FROM_ADDRESS=mastodon@tools.immae.eu | |
33 | SENDMAIL_LOCATION="/run/wrappers/bin/sendmail" | |
34 | PAPERCLIP_ROOT_PATH=${varDir} | |
35a397cd | 35 | |
50933a04 | 36 | STREAMING_CLUSTER_NUM=1 |
35a397cd | 37 | |
50933a04 | 38 | RAILS_LOG_LEVEL=warn |
46228a29 | 39 | |
50933a04 IB |
40 | # LDAP authentication (optional) |
41 | LDAP_ENABLED=true | |
42 | LDAP_HOST=ldap.immae.eu | |
43 | LDAP_PORT=636 | |
44 | LDAP_METHOD=simple_tls | |
45 | LDAP_BASE="dc=immae,dc=eu" | |
46 | LDAP_BIND_DN="cn=mastodon,ou=services,dc=immae,dc=eu" | |
47 | LDAP_PASSWORD="${env.ldap.password}" | |
48 | LDAP_UID="uid" | |
49 | LDAP_SEARCH_FILTER="(&(%{uid}=%{email})(memberOf=cn=users,cn=mastodon,ou=services,dc=immae,dc=eu))" | |
35a397cd | 50 | ''; |
50933a04 | 51 | }; |
35a397cd | 52 | |
20e1428f | 53 | railsRoot = mastodon.override { inherit varDir; }; |
35a397cd IB |
54 | in |
55 | { | |
20e1428f IB |
56 | inherit varDir railsRoot socketsDir; |
57 | inherit (railsRoot.passthru) gems; | |
32c84ff8 | 58 | keys = builtins.attrValues keys; |
35a397cd IB |
59 | nodeSocket = "${socketsDir}/live_immae_node.sock"; |
60 | railsSocket = "${socketsDir}/live_immae_puma.sock"; | |
61 | } |