aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-03-07 12:36:02 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-03-07 12:36:02 +0100
commiteb190677ac9a4fc77afb5543417255119600fb01 (patch)
tree1fbbb7a053b01cb7e63559999ae83c823919920c
parent706060700aac9221861c29db639e89b9600e2f09 (diff)
downloadNix-eb190677ac9a4fc77afb5543417255119600fb01.tar.gz
Nix-eb190677ac9a4fc77afb5543417255119600fb01.tar.zst
Nix-eb190677ac9a4fc77afb5543417255119600fb01.zip
Migrate capitaines.fr
-rw-r--r--nixops/modules/websites/capitaines/default.nix19
1 files changed, 16 insertions, 3 deletions
diff --git a/nixops/modules/websites/capitaines/default.nix b/nixops/modules/websites/capitaines/default.nix
index 8073955..08f6dd3 100644
--- a/nixops/modules/websites/capitaines/default.nix
+++ b/nixops/modules/websites/capitaines/default.nix
@@ -13,16 +13,17 @@ in {
13 }; 13 };
14 14
15 config = lib.mkIf cfg.production.enable { 15 config = lib.mkIf cfg.production.enable {
16 security.acme.certs."capitaines_mastodon" = config.services.myCertificates.certConfig // { 16 security.acme.certs."capitaines" = config.services.myCertificates.certConfig // {
17 domain = "mastodon.capitaines.fr"; 17 domain = "mastodon.capitaines.fr";
18 extraDomains = { "capitaines.fr" = null; };
18 }; 19 };
19 system.extraSystemBuilderCmds = '' 20 system.extraSystemBuilderCmds = ''
20 mkdir -p $out/webapps 21 mkdir -p $out/webapps
21 ln -s ${siteDir} $out/webapps/${webappName} 22 ln -s ${siteDir} $out/webapps/${webappName}
22 ''; 23 '';
23 24
24 services.myWebsites.production.vhostConfs.capitaines = { 25 services.myWebsites.production.vhostConfs.capitaines_mastodon = {
25 certName = "capitaines_mastodon"; 26 certName = "capitaines";
26 hosts = [ "mastodon.capitaines.fr" ]; 27 hosts = [ "mastodon.capitaines.fr" ];
27 root = root; 28 root = root;
28 extraConfig = [ 29 extraConfig = [
@@ -36,5 +37,17 @@ in {
36 '' 37 ''
37 ]; 38 ];
38 }; 39 };
40
41 services.myWebsites.production.vhostConfs.capitaines = {
42 certName = "capitaines";
43 hosts = [ "capitaines.fr" ];
44 root = "/run/current-system/webapps/_www";
45 extraConfig = [ ''
46 <Directory /run/current-system/webapps/_www>
47 DirectoryIndex index.htm
48 Require all granted
49 </Directory>
50 '' ];
51 };
39 }; 52 };
40} 53}