courses-phil: add redirects
This commit is contained in:
parent
a2f49374e7
commit
6d277b6814
|
@ -48,5 +48,23 @@ in
|
|||
services.nginx.virtualHosts.${hostName} = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
||||
# phil redirects
|
||||
locations =
|
||||
let
|
||||
philDomain = "https://kurse-phil.ifsr.de";
|
||||
courses = [ "238" "239" "240" "241" "242" "243" ];
|
||||
subjects = [
|
||||
"ESE 2023 PHIL Campustour"
|
||||
"ESE 2023 PHIL Bowlingabend"
|
||||
"ESE 2023 PHIL Filmabend"
|
||||
"ESE 2023 PHIL Wandern"
|
||||
"ESE 2023 PHIL Spieleabend Pen and Paper"
|
||||
];
|
||||
in
|
||||
{
|
||||
"~ \"^/course/(${builtins.concatStringsSep "|" courses})/\"".return = "301 ${philDomain}/course/$1";
|
||||
"~ \"^/subject/(${builtins.concatStringsSep "|" subjects})/\"".return = "301 ${philDomain}/subject/$1";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ config, lib, sops-nix, course-management, ... }:
|
||||
let
|
||||
hostName = "phil.${config.networking.domain}";
|
||||
hostName = "kurse-phil.${config.networking.domain}";
|
||||
in
|
||||
{
|
||||
services.nginx.virtualHosts."${hostName}" = {
|
||||
|
@ -17,6 +17,7 @@ in
|
|||
# mountPoint = "/etc/ssh";
|
||||
# };
|
||||
config = { pkgs, config, ... }: {
|
||||
system.stateVersion = "23.05";
|
||||
networking.domain = "ifsr.de";
|
||||
imports = [
|
||||
sops-nix.nixosModules.sops
|
||||
|
|
Loading…
Reference in a new issue