blob: 69576c090c37ed816fa216ce7ccc31f5e6c9f264 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
{ lib, pkgs, config, myconfig, mylibs, ... }:
let
cfg = config.services.myWebsites.Nassime;
varDir = "/var/lib/ftp/nassime";
env = myconfig.env.websites.nassime;
in {
options.services.myWebsites.Nassime = {
production = {
enable = lib.mkEnableOption "enable Nassime's website";
};
};
imports = [
../commons/stats.nix
];
config = lib.mkIf cfg.production.enable {
services.myWebsites.commons.stats.enable = true;
services.myWebsites.commons.stats.sites = [
{
name = "nassime.bouya.org";
conf = ./nassime_goaccess.conf;
}
];
security.acme.certs."ftp".extraDomains."nassime.bouya.org" = null;
security.acme.certs."nassime" = config.services.myCertificates.certConfig // {
domain = "nassime.bouya.org";
};
services.myWebsites.production.vhostConfs.nassime = {
certName = "nassime";
hosts = ["nassime.bouya.org" ];
root = varDir;
extraConfig = [
''
Use Stats nassime.bouya.org
ServerAdmin ${env.server_admin}
<Directory ${varDir}>
DirectoryIndex index.php index.htm index.html
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride None
Require all granted
</Directory>
''
];
};
};
}
|