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