diff --git a/hosts/poseidon/default.nix b/hosts/poseidon/default.nix index 7077116..2655868 100644 --- a/hosts/poseidon/default.nix +++ b/hosts/poseidon/default.nix @@ -118,6 +118,10 @@ in enable = true; }; + tgv = { + enable = true; + }; + transmission = { enable = true; username = "alarsyo"; diff --git a/services/default.nix b/services/default.nix index 07c86fa..3000594 100644 --- a/services/default.nix +++ b/services/default.nix @@ -13,6 +13,7 @@ ./monitoring.nix ./nginx.nix ./postgresql-backup.nix + ./tgv.nix ./transmission.nix ./wireguard.nix ]; diff --git a/services/tgv.nix b/services/tgv.nix new file mode 100644 index 0000000..eb6107e --- /dev/null +++ b/services/tgv.nix @@ -0,0 +1,24 @@ +{ config, lib, ... }: + +with lib; + +let + cfg = config.my.services.tgv; + my = config.my; +in +{ + options.my.services.tgv = { + enable = lib.mkEnableOption "TGV redirect"; + }; + + config = mkIf cfg.enable { + services.nginx.virtualHosts = { + "tgv.sexy" = { + forceSSL = true; + enableACME = true; + + locations."/".return = "301 http://www.mlgtraffic.net/"; + }; + }; + }; +}