Deploy to production + matrix well-known
This commit is contained in:
parent
d782f28bec
commit
690ea06e1c
2 changed files with 12 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
{ pkgs, baseDomain, ... }: {
|
||||
_module.args.baseDomain = "dev.chaos.jetzt";
|
||||
_module.args.baseDomain = "chaos.jetzt";
|
||||
|
||||
imports = [
|
||||
./hardware-config.nix
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
{ pkgs, baseDomain, ...}: {
|
||||
{ lib, pkgs, config, baseDomain, ...}:
|
||||
let
|
||||
matrixWellKnown = {
|
||||
client."m.homeserver".base_url = "https://matrix.${baseDomain}/";
|
||||
server."m.server" = "matrix.${baseDomain}:443";
|
||||
};
|
||||
toJSONFile = name: value: pkgs.writeText name (builtins.toJSON value);
|
||||
matrixWellKnownDir = pkgs.linkFarm "matrix-well-known" (builtins.mapAttrs toJSONFile matrixWellKnown);
|
||||
in {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
enableReload = true;
|
||||
|
@ -11,8 +19,10 @@
|
|||
default = true;
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
serverAliases = [ "www.${baseDomain}" ];
|
||||
# TODO: Change this to be deployed by some sort of CI + rsync so we don't need to always update the package version
|
||||
locations."/".root = pkgs.chaos-jetzt-website-pelican;
|
||||
locations."/.well-known/matrix/".alias = matrixWellKnownDir + "/";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue