diff options
Diffstat (limited to 'modules/private/websites/nassime')
-rw-r--r-- | modules/private/websites/nassime/production.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/modules/private/websites/nassime/production.nix b/modules/private/websites/nassime/production.nix new file mode 100644 index 00000000..a1097784 --- /dev/null +++ b/modules/private/websites/nassime/production.nix | |||
@@ -0,0 +1,34 @@ | |||
1 | { lib, pkgs, config, myconfig, ... }: | ||
2 | let | ||
3 | cfg = config.myServices.websites.nassime.production; | ||
4 | varDir = "/var/lib/ftp/nassime"; | ||
5 | env = myconfig.env.websites.nassime; | ||
6 | in { | ||
7 | options.myServices.websites.nassime.production.enable = lib.mkEnableOption "enable Nassime's website"; | ||
8 | |||
9 | config = lib.mkIf cfg.enable { | ||
10 | services.webstats.sites = [ { name = "nassime.bouya.org"; } ]; | ||
11 | |||
12 | security.acme.certs."ftp".extraDomains."nassime.bouya.org" = null; | ||
13 | |||
14 | services.websites.production.vhostConfs.nassime = { | ||
15 | certName = "nassime"; | ||
16 | certMainHost = "nassime.bouya.org"; | ||
17 | hosts = ["nassime.bouya.org" ]; | ||
18 | root = varDir; | ||
19 | extraConfig = [ | ||
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 | } | ||