37 lines
734 B
Nix
37 lines
734 B
Nix
|
{ config, lib, ... }:
|
||
|
|
||
|
with lib;
|
||
|
|
||
|
let
|
||
|
cfg = config.my.services.nuage;
|
||
|
my = config.my;
|
||
|
in
|
||
|
{
|
||
|
options.my.services.nuage = {
|
||
|
enable = lib.mkEnableOption "Nuage redirect";
|
||
|
};
|
||
|
|
||
|
config = mkIf cfg.enable {
|
||
|
services.nginx.virtualHosts = {
|
||
|
"stratocumulus.org" = {
|
||
|
forceSSL = true;
|
||
|
enableACME = true;
|
||
|
|
||
|
locations."/".return = "301 https://petit-nuage.org";
|
||
|
};
|
||
|
"petit.stratocumulus.org" = {
|
||
|
forceSSL = true;
|
||
|
enableACME = true;
|
||
|
|
||
|
locations."/".return = "301 https://petit-nuage.org";
|
||
|
};
|
||
|
"gros.stratocumulus.org" = {
|
||
|
forceSSL = true;
|
||
|
enableACME = true;
|
||
|
|
||
|
locations."/".return = "301 https://gros-nuage.org";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|