aboutsummaryrefslogtreecommitdiff
path: root/nixops/modules/websites/emilia
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-16 23:23:05 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-17 00:04:47 +0200
commit7df420c27ebe7daaa4fd099c457ce9a9075b840e (patch)
treeec41e01e9331652c09dc4f2ed4186ce5952c3882 /nixops/modules/websites/emilia
parent52f45eb051df228955add90ca62de66a7ed8af34 (diff)
downloadNix-7df420c27ebe7daaa4fd099c457ce9a9075b840e.tar.gz
Nix-7df420c27ebe7daaa4fd099c457ce9a9075b840e.tar.zst
Nix-7df420c27ebe7daaa4fd099c457ce9a9075b840e.zip
Add certificate creation and handling to websites
Diffstat (limited to 'nixops/modules/websites/emilia')
-rw-r--r--nixops/modules/websites/emilia/default.nix16
1 files changed, 5 insertions, 11 deletions
diff --git a/nixops/modules/websites/emilia/default.nix b/nixops/modules/websites/emilia/default.nix
index 4e32bec..47257b7 100644
--- a/nixops/modules/websites/emilia/default.nix
+++ b/nixops/modules/websites/emilia/default.nix
@@ -47,13 +47,6 @@ in {
47 }; 47 };
48 48
49 config = lib.mkIf cfg.production.enable { 49 config = lib.mkIf cfg.production.enable {
50 security.acme.certs."emilia" = config.services.myCertificates.certConfig // {
51 domain = "saison-photo.org";
52 extraDomains = {
53 "www.saison-photo.org" = null;
54 };
55 };
56
57 system.activationScripts.emilia = '' 50 system.activationScripts.emilia = ''
58 install -m 0755 -o wwwrun -g wwwrun -d ${varDir} 51 install -m 0755 -o wwwrun -g wwwrun -d ${varDir}
59 ''; 52 '';
@@ -62,10 +55,11 @@ in {
62 ln -s ${siteDir} $out/webapps/${webappName} 55 ln -s ${siteDir} $out/webapps/${webappName}
63 ''; 56 '';
64 services.websites.production.vhostConfs.emilia = { 57 services.websites.production.vhostConfs.emilia = {
65 certName = "emilia"; 58 certName = "emilia";
66 hosts = [ "saison-photo.org" "www.saison-photo.org" ]; 59 certMainHost = "saison-photo.org";
67 root = root; 60 hosts = [ "saison-photo.org" "www.saison-photo.org" ];
68 extraConfig = [ 61 root = root;
62 extraConfig = [
69 '' 63 ''
70 <Directory ${root}> 64 <Directory ${root}>
71 DirectoryIndex pause.html 65 DirectoryIndex pause.html