]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/nassime/production.nix
Refactor websites
[perso/Immae/Config/Nix.git] / modules / private / websites / nassime / production.nix
index f9468f92e872ad044f9056dc681541e83635f2a7..1179351fb3166d781c6c1902f77fd46c5e1fc84f 100644 (file)
@@ -3,26 +3,27 @@ let
   cfg = config.myServices.websites.nassime.production;
   varDir = "/var/lib/ftp/nassime";
   env = config.myEnv.websites.nassime;
+  domain = "nassime.bouya.org";
 in {
   options.myServices.websites.nassime.production.enable = lib.mkEnableOption "enable Nassime's website";
 
   config = lib.mkIf cfg.enable {
-    services.webstats.sites = [ { name = "nassime.bouya.org"; } ];
+    services.webstats.sites = [ { name = domain; } ];
 
-    security.acme.certs."ftp".extraDomains."nassime.bouya.org" = null;
+    security.acme.certs."ftp".extraDomains."${domain}" = null;
 
     services.websites.env.production.vhostConfs.nassime = {
       certName     = "nassime";
-      certMainHost = "nassime.bouya.org";
-      hosts        = ["nassime.bouya.org" ];
+      certMainHost = domain;
+      hosts        = [ domain ];
       root         = varDir;
       extraConfig  = [
         ''
-        Use Stats nassime.bouya.org
+        Use Stats ${domain}
         ServerAdmin ${env.server_admin}
 
         <Directory ${varDir}>
-          DirectoryIndex index.php index.htm index.html
+          DirectoryIndex index.htm index.html
           Options Indexes FollowSymLinks MultiViews Includes
           AllowOverride None
           Require all granted