diff --git a/devices/vps6/default.nix b/devices/vps6/default.nix index 19756697..a23e0708 100644 --- a/devices/vps6/default.nix +++ b/devices/vps6/default.nix @@ -51,6 +51,7 @@ inputs: blog = {}; sticker = {}; tgapi = {}; + short = {}; }; }; coturn = {}; diff --git a/flake/dns/config/chn.moe.nix b/flake/dns/config/chn.moe.nix index 141be441..3784cac4 100644 --- a/flake/dns/config/chn.moe.nix +++ b/flake/dns/config/chn.moe.nix @@ -14,7 +14,7 @@ let vps6 = [ "blog" "catalog" "coturn" "element" "initrd.vps6" "sticker" "synapse-admin" "tgapi" "ua" "xserver2" - "xserver2.vps6" + "xserver2.vps6" "s" # to pc "铜锣湾实验室" ]; diff --git a/modules/services/nginx/applications/short.nix b/modules/services/nginx/applications/short.nix new file mode 100644 index 00000000..a22c4b13 --- /dev/null +++ b/modules/services/nginx/applications/short.nix @@ -0,0 +1,12 @@ +inputs: +{ + options.nixos.services.nginx.applications.short = let inherit (inputs.lib) mkOption types; in mkOption + { type = types.nullOr (types.submodule {}); default = null; }; + config = let inherit (inputs.config.nixos.services.nginx.applications) short; in inputs.lib.mkIf (short != null) + { + nixos.services.nginx.https."s.chn.moe".location = + { + "/k".return.return = "302 https://kanggroup.xmu.edu.cn"; + }; + }; +}