aboutsummaryrefslogtreecommitdiff
path: root/modules/private/system/dilion.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-05-23 03:37:06 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-05-23 03:37:06 +0200
commitba9412966f462a18f913cb22d9be3aae9728230f (patch)
treebf47ec165de3f8026ada485b714de5d111f2c4db /modules/private/system/dilion.nix
parent46b7e62708f01eaefef78341819643eeceea8130 (diff)
downloadNix-ba9412966f462a18f913cb22d9be3aae9728230f.tar.gz
Nix-ba9412966f462a18f913cb22d9be3aae9728230f.tar.zst
Nix-ba9412966f462a18f913cb22d9be3aae9728230f.zip
Add discourse on dilion (via docker)
Diffstat (limited to 'modules/private/system/dilion.nix')
-rw-r--r--modules/private/system/dilion.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/modules/private/system/dilion.nix b/modules/private/system/dilion.nix
index 4860d07..d8bad6b 100644
--- a/modules/private/system/dilion.nix
+++ b/modules/private/system/dilion.nix
@@ -107,6 +107,36 @@
107 nix.binaryCaches = [ "https://hydra.iohk.io" "https://cache.nixos.org" ]; 107 nix.binaryCaches = [ "https://hydra.iohk.io" "https://cache.nixos.org" ];
108 nix.binaryCachePublicKeys = [ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ]; 108 nix.binaryCachePublicKeys = [ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ];
109 109
110 myServices.certificates.enable = true;
111 security.acme.certs."${name}" = {
112 user = config.services.nginx.user;
113 group = config.services.nginx.group;
114 extraDomains = {
115 "discourse.immae.eu" = null;
116 "discourse.cip-ca.fr" = null;
117 };
118 };
119 services.nginx = {
120 enable = true;
121 recommendedOptimisation = true;
122 recommendedGzipSettings = true;
123 recommendedProxySettings = true;
124 virtualHosts = {
125 "discourse.immae.eu" = {
126 acmeRoot = config.myServices.certificates.webroot;
127 useACMEHost = name;
128 forceSSL = true;
129 locations."/".proxyPass = "http://localhost:18031";
130 };
131 "discourse.cip-ca.fr" = {
132 acmeRoot = config.myServices.certificates.webroot;
133 useACMEHost = name;
134 forceSSL = true;
135 locations."/".proxyPass = "http://localhost:18031";
136 };
137 };
138 };
139
110 # This value determines the NixOS release with which your system is 140 # This value determines the NixOS release with which your system is
111 # to be compatible, in order to avoid breaking some software such as 141 # to be compatible, in order to avoid breaking some software such as
112 # database servers. You should change this only after NixOS release 142 # database servers. You should change this only after NixOS release