services: init nuage
This commit is contained in:
parent
26ea717eaa
commit
7c8017af03
|
@ -107,6 +107,10 @@ in
|
|||
enable = true;
|
||||
};
|
||||
|
||||
nuage = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
postgresql-backup = {
|
||||
enable = true;
|
||||
};
|
||||
|
|
|
@ -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
36
services/nuage.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue