aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/nassime
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-04-18 16:10:56 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-04-20 01:51:48 +0200
commitd3452fc59b9839846225fd254926c64a9c71f071 (patch)
treea98a0958b826ac4b2ab137720edf0195c65dd958 /modules/private/websites/nassime
parent514f9ec3beec470c4445be690673a0ceab9115b4 (diff)
downloadNix-d3452fc59b9839846225fd254926c64a9c71f071.tar.gz
Nix-d3452fc59b9839846225fd254926c64a9c71f071.tar.zst
Nix-d3452fc59b9839846225fd254926c64a9c71f071.zip
Refactor websites
Diffstat (limited to 'modules/private/websites/nassime')
-rw-r--r--modules/private/websites/nassime/production.nix13
1 files changed, 7 insertions, 6 deletions
diff --git a/modules/private/websites/nassime/production.nix b/modules/private/websites/nassime/production.nix
index f9468f9..1179351 100644
--- a/modules/private/websites/nassime/production.nix
+++ b/modules/private/websites/nassime/production.nix
@@ -3,26 +3,27 @@ let
3 cfg = config.myServices.websites.nassime.production; 3 cfg = config.myServices.websites.nassime.production;
4 varDir = "/var/lib/ftp/nassime"; 4 varDir = "/var/lib/ftp/nassime";
5 env = config.myEnv.websites.nassime; 5 env = config.myEnv.websites.nassime;
6 domain = "nassime.bouya.org";
6in { 7in {
7 options.myServices.websites.nassime.production.enable = lib.mkEnableOption "enable Nassime's website"; 8 options.myServices.websites.nassime.production.enable = lib.mkEnableOption "enable Nassime's website";
8 9
9 config = lib.mkIf cfg.enable { 10 config = lib.mkIf cfg.enable {
10 services.webstats.sites = [ { name = "nassime.bouya.org"; } ]; 11 services.webstats.sites = [ { name = domain; } ];
11 12
12 security.acme.certs."ftp".extraDomains."nassime.bouya.org" = null; 13 security.acme.certs."ftp".extraDomains."${domain}" = null;
13 14
14 services.websites.env.production.vhostConfs.nassime = { 15 services.websites.env.production.vhostConfs.nassime = {
15 certName = "nassime"; 16 certName = "nassime";
16 certMainHost = "nassime.bouya.org"; 17 certMainHost = domain;
17 hosts = ["nassime.bouya.org" ]; 18 hosts = [ domain ];
18 root = varDir; 19 root = varDir;
19 extraConfig = [ 20 extraConfig = [
20 '' 21 ''
21 Use Stats nassime.bouya.org 22 Use Stats ${domain}
22 ServerAdmin ${env.server_admin} 23 ServerAdmin ${env.server_admin}
23 24
24 <Directory ${varDir}> 25 <Directory ${varDir}>
25 DirectoryIndex index.php index.htm index.html 26 DirectoryIndex index.htm index.html
26 Options Indexes FollowSymLinks MultiViews Includes 27 Options Indexes FollowSymLinks MultiViews Includes
27 AllowOverride None 28 AllowOverride None
28 Require all granted 29 Require all granted