tgv: new service
This commit is contained in:
parent
df4ce5afb2
commit
bb477b36a6
|
@ -118,6 +118,10 @@ in
|
|||
enable = true;
|
||||
};
|
||||
|
||||
tgv = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
transmission = {
|
||||
enable = true;
|
||||
username = "alarsyo";
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
./monitoring.nix
|
||||
./nginx.nix
|
||||
./postgresql-backup.nix
|
||||
./tgv.nix
|
||||
./transmission.nix
|
||||
./wireguard.nix
|
||||
];
|
||||
|
|
24
services/tgv.nix
Normal file
24
services/tgv.nix
Normal 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/";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue