tgv: new service

This commit is contained in:
Antoine Martin 2021-03-16 17:46:25 +01:00
parent df4ce5afb2
commit bb477b36a6
3 changed files with 29 additions and 0 deletions

View file

@ -118,6 +118,10 @@ in
enable = true; enable = true;
}; };
tgv = {
enable = true;
};
transmission = { transmission = {
enable = true; enable = true;
username = "alarsyo"; username = "alarsyo";

View file

@ -13,6 +13,7 @@
./monitoring.nix ./monitoring.nix
./nginx.nix ./nginx.nix
./postgresql-backup.nix ./postgresql-backup.nix
./tgv.nix
./transmission.nix ./transmission.nix
./wireguard.nix ./wireguard.nix
]; ];

24
services/tgv.nix Normal file
View file

@ -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/";
};
};
};
}