From f8026b6e4c869aa108f6361c8ccd50890657994d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 18 May 2019 10:49:00 +0200 Subject: Move personal websites to modules --- modules/private/websites/nassime/production.nix | 34 +++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 modules/private/websites/nassime/production.nix (limited to 'modules/private/websites/nassime') diff --git a/modules/private/websites/nassime/production.nix b/modules/private/websites/nassime/production.nix new file mode 100644 index 0000000..a109778 --- /dev/null +++ b/modules/private/websites/nassime/production.nix @@ -0,0 +1,34 @@ +{ lib, pkgs, config, myconfig, ... }: +let + cfg = config.myServices.websites.nassime.production; + varDir = "/var/lib/ftp/nassime"; + env = myconfig.env.websites.nassime; +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"; } ]; + + security.acme.certs."ftp".extraDomains."nassime.bouya.org" = null; + + services.websites.production.vhostConfs.nassime = { + certName = "nassime"; + certMainHost = "nassime.bouya.org"; + hosts = ["nassime.bouya.org" ]; + root = varDir; + extraConfig = [ + '' + Use Stats nassime.bouya.org + ServerAdmin ${env.server_admin} + + + DirectoryIndex index.php index.htm index.html + Options Indexes FollowSymLinks MultiViews Includes + AllowOverride None + Require all granted + + '' + ]; + }; + }; +} -- cgit v1.2.3