1
0
Fork 0

sail: Update libreddit nginx config

This commit is contained in:
Daniel Kempkens 2023-03-05 23:51:30 +01:00
parent d86187e2ee
commit c01d25d3fe
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
4 changed files with 15 additions and 12 deletions

Binary file not shown.

View file

@ -17,6 +17,7 @@ in
../nixos/cloudflared.nix ../nixos/cloudflared.nix
../nixos/acme-sail.nix ../nixos/acme-sail.nix
../nixos/nginx.nix
../nixos/atuin-sync.nix ../nixos/atuin-sync.nix
@ -24,7 +25,7 @@ in
(import ../nixos/freshrss.nix (args // { inherit secret; })) (import ../nixos/freshrss.nix (args // { inherit secret; }))
../nixos/libreddit.nix (import ../nixos/libreddit.nix (args // { inherit secret; }))
(import ../nixos/mastodon.nix (args // { inherit secret; })) (import ../nixos/mastodon.nix (args // { inherit secret; }))

View file

@ -1,4 +1,4 @@
{ config, ... }: { config, secret, ... }:
{ {
services.libreddit = { services.libreddit = {
@ -9,16 +9,9 @@
}; };
services.nginx = { services.nginx = {
virtualHosts."libreddit.only.internal" = { virtualHosts."${secret.nginx.hostnames.libreddit}" = {
listen = [ forceSSL = true;
{ useACMEHost = "daniel.sx";
addr = "127.0.0.1";
port = 80;
}
];
forceSSL = false;
enableACME = false;
basicAuthFile = config.age.secrets.libreddit-auth.path; basicAuthFile = config.age.secrets.libreddit-auth.path;
locations."/" = { locations."/" = {

9
system/nixos/nginx.nix Normal file
View file

@ -0,0 +1,9 @@
{
services.nginx = {
enable = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedBrotliSettings = true;
recommendedTlsSettings = true;
};
}