feat(metis): Update and validate providers
All checks were successful
build configuration / build_and_cache_geo02 (push) Successful in 1m12s
build configuration / build_and_cache_storage01 (push) Successful in 1m21s
build configuration / build_and_cache_rescue01 (push) Successful in 1m21s
build configuration / build_and_cache_geo01 (push) Successful in 1m24s
build configuration / build_and_cache_compute01 (push) Successful in 1m40s
build configuration / build_and_cache_vault01 (push) Successful in 1m29s
build configuration / build_and_cache_web03 (push) Successful in 1m21s
build configuration / build_and_cache_bridge01 (push) Successful in 1m8s
build configuration / build_and_cache_web02 (push) Successful in 1m30s
lint / check (push) Successful in 23s
build configuration / build_and_cache_web01 (push) Successful in 2m34s
All checks were successful
build configuration / build_and_cache_geo02 (push) Successful in 1m12s
build configuration / build_and_cache_storage01 (push) Successful in 1m21s
build configuration / build_and_cache_rescue01 (push) Successful in 1m21s
build configuration / build_and_cache_geo01 (push) Successful in 1m24s
build configuration / build_and_cache_compute01 (push) Successful in 1m40s
build configuration / build_and_cache_vault01 (push) Successful in 1m29s
build configuration / build_and_cache_web03 (push) Successful in 1m21s
build configuration / build_and_cache_bridge01 (push) Successful in 1m8s
build configuration / build_and_cache_web02 (push) Successful in 1m30s
lint / check (push) Successful in 23s
build configuration / build_and_cache_web01 (push) Successful in 2m34s
This commit is contained in:
parent
d2f039755b
commit
0e3463102c
2 changed files with 13 additions and 8 deletions
|
@ -6,30 +6,35 @@
|
|||
}:
|
||||
|
||||
let
|
||||
metis = import sources.metis { inherit pkgs; };
|
||||
inherit (lib) mapAttrsToList match;
|
||||
|
||||
inherit (metis) providers;
|
||||
metis = import sources.metis { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
services.nginx.virtualHosts."calendrier.dgnum.eu" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = metis.production;
|
||||
root = metis.package;
|
||||
|
||||
locations = lib.mapAttrs' (
|
||||
name: value:
|
||||
name: domain:
|
||||
lib.nameValuePair "/cal/${name}/" {
|
||||
extraConfig = ''
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Server $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass ${value};
|
||||
proxy_pass https://${domain}/remote.php/dav/public-calendars/;
|
||||
'';
|
||||
}
|
||||
) providers;
|
||||
) metis.providers;
|
||||
|
||||
extraConfig = ''
|
||||
rewrite ^/calendrier(.*)$ $1 permanent;
|
||||
'';
|
||||
};
|
||||
|
||||
assertions = mapAttrsToList (name: domain: {
|
||||
assertion = (match "[a-z-]+" name == [ ]) && (match "[a-z.-]+" domain == [ ]);
|
||||
message = "The provider `${name}` associated to the domain `${domain}` seems to have an incorrect definition.";
|
||||
}) metis.providers;
|
||||
}
|
||||
|
|
|
@ -178,9 +178,9 @@
|
|||
"url": "https://git.dgnum.eu/DGNum/metis"
|
||||
},
|
||||
"branch": "master",
|
||||
"revision": "5c5e0c356bc60c15699a0830ef675af821afbb5b",
|
||||
"revision": "ed6fafda45d638b1bafd5deaee098b80156b41e8",
|
||||
"url": null,
|
||||
"hash": "0lijsmgcqqqrdi2qdycwsaczcjja5blvx4kx1ssclvsm8aipbbs0"
|
||||
"hash": "086spyhn2x1x2h31b0y4an501fdhph1nk64riybqnh6mqjkzlq4m"
|
||||
},
|
||||
"microvm.nix": {
|
||||
"type": "Git",
|
||||
|
|
Loading…
Reference in a new issue