|
195 | 195 | affect other virtualHosts running on your nginx instance, if any. |
196 | 196 | Alternatively you can configure a reverse-proxy of your choice to serve these paths: |
197 | 197 |
|
198 | | - `/ -> $(nix-instantiate --eval '<nixpkgs>' -A mastodon.outPath)/public` |
| 198 | + `/ -> ''${pkgs.mastodon}/public` |
199 | 199 |
|
200 | 200 | `/ -> 127.0.0.1:{{ webPort }} `(If there was no file in the directory above.) |
201 | 201 |
|
@@ -324,6 +324,21 @@ in { |
324 | 324 | type = lib.types.str; |
325 | 325 | }; |
326 | 326 |
|
| 327 | + vapidPrivateKeyFile = lib.mkOption { |
| 328 | + description = '' |
| 329 | + Path to file containing the private key used for Web Push |
| 330 | + Voluntary Application Server Identification. A new keypair can |
| 331 | + be generated by running: |
| 332 | +
|
| 333 | + `nix build -f '<nixpkgs>' mastodon; cd result; bin/rake webpush:generate_keys` |
| 334 | +
|
| 335 | + If this file does not exist, it will be created with a new |
| 336 | + private key. |
| 337 | + ''; |
| 338 | + default = "/var/lib/mastodon/secrets/vapid-private-key"; |
| 339 | + type = lib.types.str; |
| 340 | + }; |
| 341 | + |
327 | 342 | localDomain = lib.mkOption { |
328 | 343 | description = "The domain serving your Mastodon instance."; |
329 | 344 | example = "social.example.org"; |
@@ -401,21 +416,6 @@ in { |
401 | 416 | type = lib.types.str; |
402 | 417 | }; |
403 | 418 |
|
404 | | - vapidPrivateKeyFile = lib.mkOption { |
405 | | - description = '' |
406 | | - Path to file containing the private key used for Web Push |
407 | | - Voluntary Application Server Identification. A new keypair can |
408 | | - be generated by running: |
409 | | -
|
410 | | - `nix build -f '<nixpkgs>' mastodon; cd result; bin/rake webpush:generate_keys` |
411 | | -
|
412 | | - If this file does not exist, it will be created with a new |
413 | | - private key. |
414 | | - ''; |
415 | | - default = "/var/lib/mastodon/secrets/vapid-private-key"; |
416 | | - type = lib.types.str; |
417 | | - }; |
418 | | - |
419 | 419 | trustedProxy = lib.mkOption { |
420 | 420 | description = '' |
421 | 421 | You need to set it to the IP from which your reverse proxy sends requests to Mastodon's web process, |
|
945 | 945 | enable = true; |
946 | 946 | hostname = lib.mkDefault "${cfg.localDomain}"; |
947 | 947 | }; |
| 948 | + |
948 | 949 | services.redis.servers.mastodon = lib.mkIf redisActuallyCreateLocally (lib.mkMerge [ |
949 | 950 | { |
950 | 951 | enable = true; |
|
953 | 954 | port = cfg.redis.port; |
954 | 955 | }) |
955 | 956 | ]); |
| 957 | + |
956 | 958 | services.postgresql = lib.mkIf databaseActuallyCreateLocally { |
957 | 959 | enable = true; |
958 | 960 | ensureUsers = [ |
|
0 commit comments