]>
Commit | Line | Data |
---|---|---|
1a64deeb IB |
1 | { lib, pkgs, config, ... }: |
2 | let | |
3 | infcloud = rec { | |
4 | root = pkgs.webapps-infcloud; | |
5 | vhostConf = '' | |
6 | Alias /carddavmate ${root} | |
7 | Alias /caldavzap ${root} | |
8 | Alias /infcloud ${root} | |
9 | <Directory ${root}> | |
10 | AllowOverride All | |
11 | Options FollowSymlinks | |
12 | Require all granted | |
13 | DirectoryIndex index.html | |
14 | </Directory> | |
15 | ''; | |
16 | }; | |
17 | davical = pkgs.callPackage ./davical.nix { | |
18 | env = config.myEnv.tools.davical; | |
19 | davical = pkgs.webapps-davical; | |
20 | awl = pkgs.webapps-awl; | |
21 | inherit config; | |
22 | }; | |
23 | ||
24 | cfg = config.myServices.websites.tools.dav; | |
25 | in { | |
26 | options.myServices.websites.tools.dav = { | |
27 | enable = lib.mkEnableOption "enable dav website"; | |
28 | }; | |
29 | ||
30 | config = lib.mkIf cfg.enable { | |
31 | myServices.dns.zones."immae.eu".subdomains.dav = | |
32 | with config.myServices.dns.helpers; ips servers.eldiron.ips.main; | |
33 | ||
34 | myServices.chatonsProperties.services = { | |
35 | davical = { | |
36 | file.datetime = "2022-08-21T01:33:00"; | |
37 | service = { | |
38 | name = "Davical"; | |
39 | description = "DAViCal is a server for calendar sharing"; | |
40 | website = "https://dav.immae.eu"; | |
41 | logo = "https://www.davical.org/images/logo.gif"; | |
42 | status.level = "OK"; | |
43 | status.description = "OK"; | |
44 | registration."" = ["MEMBER" "CLIENT"]; | |
45 | registration.load = "OPEN"; | |
46 | install.type = "PACKAGE"; | |
47 | }; | |
48 | software = { | |
49 | name = "Davical"; | |
50 | website = "https://www.davical.org/"; | |
51 | license.url = "https://gitlab.com/davical-project/davical/-/blob/master/COPYING"; | |
52 | license.name = "GNU General Public License Version 2"; | |
53 | version = pkgs.webapps-davical.version; | |
54 | source.url = "https://gitlab.com/davical-project/davical/"; | |
55 | modules = "infcloud"; | |
56 | }; | |
57 | }; | |
58 | #calendar = { | |
59 | # file.datetime = "2022-08-22T00:00:00"; | |
60 | # service = { | |
61 | # name = "Calendar"; | |
62 | # description = "Opensource CalDAV web client"; | |
63 | # website = "https://dav.immae.eu/caldavzap/"; | |
64 | # logo = "https://dav.immae.eu/caldavzap/images/infcloud_logo.svg"; | |
65 | # status.level = "OK"; | |
66 | # status.description = "OK"; | |
67 | # registration."" = ["MEMBER" "CLIENT"]; | |
68 | # registration.load = "OPEN"; | |
69 | # install.type = "PACKAGE"; | |
70 | # }; | |
71 | # software = { | |
72 | # name = "InfCloud"; | |
73 | # website = "https://inf-it.com/open-source/clients/infcloud/"; | |
74 | # license.url = "https://www.gnu.org/licenses/agpl-3.0.en.html"; | |
75 | # license.name = "GNU Affero General Public License (version 3.0)"; | |
76 | # version = pkgs.webapps-infcloud.version; | |
77 | # source.url = "https://inf-it.com/open-source/clients/infcloud/"; | |
78 | # }; | |
79 | #}; | |
80 | #contacts = { | |
81 | # file.datetime = "2022-08-22T00:00:00"; | |
82 | # service = { | |
83 | # name = "Contacts"; | |
84 | # description = "Opensource Carddav web client"; | |
85 | # website = "https://dav.immae.eu/carddavmate/"; | |
86 | # logo = "https://dav.immae.eu/caldavzap/images/infcloud_logo.svg"; | |
87 | # status.level = "OK"; | |
88 | # status.description = "OK"; | |
89 | # registration."" = ["MEMBER" "CLIENT"]; | |
90 | # registration.load = "OPEN"; | |
91 | # install.type = "PACKAGE"; | |
92 | # }; | |
93 | # software = { | |
94 | # name = "InfCloud"; | |
95 | # website = "https://inf-it.com/open-source/clients/infcloud/"; | |
96 | # license.url = "https://www.gnu.org/licenses/agpl-3.0.en.html"; | |
97 | # license.name = "GNU Affero General Public License (version 3.0)"; | |
98 | # version = pkgs.webapps-infcloud.version; | |
99 | # source.url = "https://inf-it.com/open-source/clients/infcloud/"; | |
100 | # }; | |
101 | #}; | |
102 | }; | |
103 | secrets.keys = davical.keys; | |
104 | services.websites.env.tools.modules = davical.apache.modules; | |
105 | ||
106 | security.acme.certs.eldiron.extraDomainNames = [ "dav.immae.eu" ]; | |
107 | services.websites.env.tools.vhostConfs.dav = { | |
108 | certName = "eldiron"; | |
109 | hosts = ["dav.immae.eu" ]; | |
110 | root = ./www; | |
111 | extraConfig = [ | |
112 | infcloud.vhostConf | |
113 | (davical.apache.vhostConf config.services.phpfpm.pools.davical.socket) | |
114 | ]; | |
115 | }; | |
116 | ||
117 | services.phpfpm.pools = { | |
118 | davical = { | |
119 | user = config.services.websites.env.tools.user; | |
120 | group = config.services.websites.env.tools.group; | |
121 | settings = davical.phpFpm.pool; | |
122 | phpPackage = pkgs.php72.withExtensions({ enabled, all }: enabled ++ [all.redis]); | |
123 | }; | |
124 | }; | |
125 | myServices.monitoring.fromMasterActivatedPlugins = [ "http" ]; | |
126 | myServices.monitoring.fromMasterObjects.service = [ | |
127 | { | |
128 | service_description = "davical website is running on dav.immae.eu"; | |
129 | host_name = config.hostEnv.fqdn; | |
130 | use = "external-web-service"; | |
131 | check_command = ["check_https" "dav.immae.eu" "/davical/" "Log On Please"]; | |
132 | ||
133 | servicegroups = "webstatus-webapps"; | |
134 | _webstatus_name = "Davical"; | |
135 | _webstatus_url = "https://dav.immae.eu/davical"; | |
136 | } | |
137 | ]; | |
138 | }; | |
139 | } | |
140 |