Add static sites

This commit is contained in:
hackens server 2023-07-25 18:59:13 +02:00
parent 49ffb15fb3
commit ae0ab8a439
4 changed files with 25 additions and 3 deletions

View file

@ -16,6 +16,7 @@
./dokuwiki.nix ./dokuwiki.nix
./matterbridge.nix ./matterbridge.nix
./orga ./orga
./static-sites
]; ];
networking.hostName = "hackens-org"; # Define your hostname. networking.hostName = "hackens-org"; # Define your hostname.

View file

@ -1,7 +1,5 @@
{ config, pkgs, lib, ... }: { { config, pkgs, lib, ... }: {
imports = [ ../../shared/dokuwiki_module.nix ];
disabledModules = [ <nixpkgs/nixos/modules/services/web-apps/dokuwiki.nix> ];
services.nginx.virtualHosts."new.hackens.org" = { services.nginx.virtualHosts."new.hackens.org" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;

View file

@ -0,0 +1,23 @@
{ pkgs, lib, ... }:
let
sites = [
"/NdS"
"/2048"
"/prez"
"/known"
"/pub"
];
in
{
services.nginx.enable = true;
services.nginx.virtualHosts."new.hackens.org" = {
forceSSL = true;
enableACME = true;
locations = lib.genAttrs sites (name: {
root = "/var/www";
extraConfig = "autoindex on;";
});
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
}

View file

@ -14,7 +14,7 @@
SIGNUPS_DOMAINS_WHITELIST = "ens.fr,ens.psl.eu"; SIGNUPS_DOMAINS_WHITELIST = "ens.fr,ens.psl.eu";
ROCKET_PORT = 10501; ROCKET_PORT = 10501;
ROCKET_ADDRESS = "127.0.0.1"; ROCKET_ADDRESS = "127.0.0.1";
LOG_FILE = "/var/log/vaultwarden"; LOG_FILE = "/var/lib/bitwarden_rs/logfile";
SIGNUPS_VERIFY = true; SIGNUPS_VERIFY = true;
}; };
environmentFile = "/etc/secrets/vaultwarden.env"; environmentFile = "/etc/secrets/vaultwarden.env";