]> git.immae.eu Git - perso/Immae/Config/Nix.git/blame - modules/private/websites/tools/dav/default.nix
Add chatons infos
[perso/Immae/Config/Nix.git] / modules / private / websites / tools / dav / default.nix
CommitLineData
ab8f306d 1{ lib, pkgs, config, ... }:
10889174 2let
452c2314 3 infcloud = rec {
750fe5a4 4 root = pkgs.webapps.infcloud;
452c2314
IB
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 };
9d90e7e2 17 davical = pkgs.callPackage ./davical.nix {
ab8f306d 18 env = config.myEnv.tools.davical;
452c2314 19 inherit (pkgs.webapps) davical awl;
da30ae4f 20 inherit config;
9d90e7e2 21 };
10889174 22
4288c2f2 23 cfg = config.myServices.websites.tools.dav;
10889174 24in {
4288c2f2 25 options.myServices.websites.tools.dav = {
10889174
IB
26 enable = lib.mkEnableOption "enable dav website";
27 };
28
29 config = lib.mkIf cfg.enable {
120bcf4d
IB
30 myServices.chatonsProperties.services = {
31 davical = {
32 file.datetime = "2022-08-21T01:33:00";
33 service = {
34 name = "Davical";
35 description = "DAViCal is a server for calendar sharing";
36 website = "https://dav.immae.eu";
37 logo = "https://www.davical.org/images/logo.gif";
38 status.level = "OK";
39 status.description = "OK";
40 registration."" = ["MEMBER" "CLIENT"];
41 registration.load = "OPEN";
42 install.type = "PACKAGE";
43 };
44 software = {
45 name = "Davical";
46 website = "https://www.davical.org/";
47 license.url = "https://gitlab.com/davical-project/davical/-/blob/master/COPYING";
48 license.name = "GNU General Public License Version 2";
49 version = pkgs.webapps.davical.version;
50 source.url = "https://gitlab.com/davical-project/davical/";
51 modules = "infcloud";
52 };
53 };
54 #calendar = {
55 # file.datetime = "2022-08-22T00:00:00";
56 # service = {
57 # name = "Calendar";
58 # description = "Opensource CalDAV web client";
59 # website = "https://dav.immae.eu/caldavzap/";
60 # logo = "https://dav.immae.eu/caldavzap/images/infcloud_logo.svg";
61 # status.level = "OK";
62 # status.description = "OK";
63 # registration."" = ["MEMBER" "CLIENT"];
64 # registration.load = "OPEN";
65 # install.type = "PACKAGE";
66 # };
67 # software = {
68 # name = "InfCloud";
69 # website = "https://inf-it.com/open-source/clients/infcloud/";
70 # license.url = "https://www.gnu.org/licenses/agpl-3.0.en.html";
71 # license.name = "GNU Affero General Public License (version 3.0)";
72 # version = pkgs.webapps.infcloud.version;
73 # source.url = "https://inf-it.com/open-source/clients/infcloud/";
74 # };
75 #};
76 #contacts = {
77 # file.datetime = "2022-08-22T00:00:00";
78 # service = {
79 # name = "Contacts";
80 # description = "Opensource Carddav web client";
81 # website = "https://dav.immae.eu/carddavmate/";
82 # logo = "https://dav.immae.eu/caldavzap/images/infcloud_logo.svg";
83 # status.level = "OK";
84 # status.description = "OK";
85 # registration."" = ["MEMBER" "CLIENT"];
86 # registration.load = "OPEN";
87 # install.type = "PACKAGE";
88 # };
89 # software = {
90 # name = "InfCloud";
91 # website = "https://inf-it.com/open-source/clients/infcloud/";
92 # license.url = "https://www.gnu.org/licenses/agpl-3.0.en.html";
93 # license.name = "GNU Affero General Public License (version 3.0)";
94 # version = pkgs.webapps.infcloud.version;
95 # source.url = "https://inf-it.com/open-source/clients/infcloud/";
96 # };
97 #};
98 };
4288c2f2 99 system.activationScripts.davical = davical.activationScript;
1a718805 100 secrets.keys = davical.keys;
29f8cb85 101 services.websites.env.tools.modules = davical.apache.modules;
10889174 102
29f8cb85 103 services.websites.env.tools.vhostConfs.dav = {
10889174 104 certName = "eldiron";
7df420c2 105 addToCerts = true;
10889174 106 hosts = ["dav.immae.eu" ];
750fe5a4 107 root = ./www;
10889174 108 extraConfig = [
452c2314 109 infcloud.vhostConf
5400b9b6 110 (davical.apache.vhostConf config.services.phpfpm.pools.davical.socket)
10889174
IB
111 ];
112 };
113
441da8aa
IB
114 services.phpfpm.pools = {
115 davical = {
5400b9b6
IB
116 user = config.services.httpd.Tools.user;
117 group = config.services.httpd.Tools.group;
118 settings = davical.phpFpm.pool;
dcac3ec7 119 phpPackage = pkgs.php72;
441da8aa 120 };
10889174 121 };
10889174
IB
122 };
123}
124