X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Fnassime%2Fproduction.nix;h=1179351fb3166d781c6c1902f77fd46c5e1fc84f;hb=d3452fc59b9839846225fd254926c64a9c71f071;hp=f2a414232d68ffdf97ead9ebab7b8dadbdc33529;hpb=29f8cb850d74b456d6481a456311bbf5361d328c;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/nassime/production.nix b/modules/private/websites/nassime/production.nix index f2a4142..1179351 100644 --- a/modules/private/websites/nassime/production.nix +++ b/modules/private/websites/nassime/production.nix @@ -1,28 +1,29 @@ -{ lib, pkgs, config, myconfig, ... }: +{ lib, pkgs, config, ... }: let cfg = config.myServices.websites.nassime.production; varDir = "/var/lib/ftp/nassime"; - env = myconfig.env.websites.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} - DirectoryIndex index.php index.htm index.html + DirectoryIndex index.htm index.html Options Indexes FollowSymLinks MultiViews Includes AllowOverride None Require all granted