services: init nuage

This commit is contained in:
Antoine Martin 2021-07-06 18:21:47 +02:00
parent 26ea717eaa
commit 7c8017af03
3 changed files with 41 additions and 0 deletions

View file

@ -107,6 +107,10 @@ in
enable = true;
};
nuage = {
enable = true;
};
postgresql-backup = {
enable = true;
};

View file

@ -14,6 +14,7 @@
./monitoring.nix
./nextcloud.nix
./nginx.nix
./nuage.nix
./pipewire.nix
./postgresql-backup.nix
./postgresql.nix

36
services/nuage.nix Normal file
View file

@ -0,0 +1,36 @@
{ 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";
};
};
};
}