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/acme-sail.nix
../nixos/nginx.nix
../nixos/atuin-sync.nix
@ -24,7 +25,7 @@ in
(import ../nixos/freshrss.nix (args // { inherit secret; }))
../nixos/libreddit.nix
(import ../nixos/libreddit.nix (args // { inherit secret; }))
(import ../nixos/mastodon.nix (args // { inherit secret; }))

View file

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