]> git.immae.eu Git - perso/Immae/Config/Nix.git/blame - modules/private/websites/nassime/production.nix
Upgrade nixos
[perso/Immae/Config/Nix.git] / modules / private / websites / nassime / production.nix
CommitLineData
ab8f306d 1{ lib, pkgs, config, ... }:
53b8fad9 2let
f8026b6e
IB
3 cfg = config.myServices.websites.nassime.production;
4 varDir = "/var/lib/ftp/nassime";
ab8f306d 5 env = config.myEnv.websites.nassime;
53b8fad9 6in {
f8026b6e 7 options.myServices.websites.nassime.production.enable = lib.mkEnableOption "enable Nassime's website";
53b8fad9 8
f8026b6e 9 config = lib.mkIf cfg.enable {
9eae2b47 10 services.webstats.sites = [ { name = "nassime.bouya.org"; } ];
53b8fad9 11
5400b9b6 12 security.acme.certs."ftp".extraDomains."nassime.bouya.org" = null;
53b8fad9 13
29f8cb85 14 services.websites.env.production.vhostConfs.nassime = {
7df420c2
IB
15 certName = "nassime";
16 certMainHost = "nassime.bouya.org";
17 hosts = ["nassime.bouya.org" ];
18 root = varDir;
19 extraConfig = [
53b8fad9
IB
20 ''
21 Use Stats nassime.bouya.org
22 ServerAdmin ${env.server_admin}
23
24 <Directory ${varDir}>
25 DirectoryIndex index.php index.htm index.html
26 Options Indexes FollowSymLinks MultiViews Includes
27 AllowOverride None
28 Require all granted
29 </Directory>
30 ''
31 ];
32 };
33 };
34}