nixos-config/services/tgv.nix

28 lines
438 B
Nix
Raw Normal View History

2021-03-16 17:46:25 +01:00
{ config, lib, ... }:
let
2022-01-11 16:08:21 +01:00
inherit (lib)
mkEnableOption
mkIf
;
2021-03-16 17:46:25 +01:00
cfg = config.my.services.tgv;
my = config.my;
in
{
options.my.services.tgv = {
2022-01-11 16:08:21 +01:00
enable = mkEnableOption "TGV redirect";
2021-03-16 17:46:25 +01:00
};
config = mkIf cfg.enable {
services.nginx.virtualHosts = {
"tgv.sexy" = {
forceSSL = true;
enableACME = true;
locations."/".return = "301 http://www.mlgtraffic.net/";
};
};
};
}