aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nixops/modules/ssh/default.nix5
-rw-r--r--nixops/modules/websites/tools/cloud/default.nix15
-rw-r--r--nixops/modules/websites/tools/cloud/nextcloud-config/mimetypealiases.json4
-rw-r--r--nixops/modules/websites/tools/cloud/nextcloud-config/mimetypemapping.json4
-rw-r--r--pkgs/webapps/default.nix2
-rw-r--r--pkgs/webapps/nextcloud/apps/audioplayer.nix4
-rw-r--r--pkgs/webapps/nextcloud/apps/bookmarks.nix4
-rw-r--r--pkgs/webapps/nextcloud/apps/calendar.nix4
-rw-r--r--pkgs/webapps/nextcloud/apps/carnet.nix7
-rw-r--r--pkgs/webapps/nextcloud/apps/contacts.nix4
-rw-r--r--pkgs/webapps/nextcloud/apps/deck.nix4
-rw-r--r--pkgs/webapps/nextcloud/apps/files_markdown.nix4
-rw-r--r--pkgs/webapps/nextcloud/apps/flowupload.nix7
-rw-r--r--pkgs/webapps/nextcloud/apps/gpxedit.nix14
-rw-r--r--pkgs/webapps/nextcloud/apps/gpxpod.nix14
-rw-r--r--pkgs/webapps/nextcloud/apps/keeweb.nix14
-rw-r--r--pkgs/webapps/nextcloud/apps/music.nix4
-rw-r--r--pkgs/webapps/nextcloud/apps/notes.nix4
-rw-r--r--pkgs/webapps/nextcloud/apps/ocsms.nix1
-rw-r--r--pkgs/webapps/nextcloud/apps/spreed.nix4
-rw-r--r--pkgs/webapps/nextcloud/apps/tasks.nix8
-rw-r--r--pkgs/webapps/nextcloud/default.nix22
22 files changed, 104 insertions, 49 deletions
diff --git a/nixops/modules/ssh/default.nix b/nixops/modules/ssh/default.nix
index 81b7751..4dc0d65 100644
--- a/nixops/modules/ssh/default.nix
+++ b/nixops/modules/ssh/default.nix
@@ -15,9 +15,12 @@
15 permissions = "0400"; 15 permissions = "0400";
16 text = myconfig.env.sshd.ldap.password; 16 text = myconfig.env.sshd.ldap.password;
17 }]; 17 }];
18 system.activationScripts.sshd = '' 18 system.activationScripts.sshd = {
19 deps = [ "secrets" ];
20 text = ''
19 install -Dm400 -o nobody -g nogroup -T /var/secrets/ssh-ldap /etc/ssh/ldap_password 21 install -Dm400 -o nobody -g nogroup -T /var/secrets/ssh-ldap /etc/ssh/ldap_password
20 ''; 22 '';
23 };
21 # ssh is strict about parent directory having correct rights, don't 24 # ssh is strict about parent directory having correct rights, don't
22 # move it in the nix store. 25 # move it in the nix store.
23 environment.etc."ssh/ldap_authorized_keys" = let 26 environment.etc."ssh/ldap_authorized_keys" = let
diff --git a/nixops/modules/websites/tools/cloud/default.nix b/nixops/modules/websites/tools/cloud/default.nix
index f7d25cf..a7fcd61 100644
--- a/nixops/modules/websites/tools/cloud/default.nix
+++ b/nixops/modules/websites/tools/cloud/default.nix
@@ -94,7 +94,7 @@ in {
94 'passwordsalt' => '${env.password_salt}', 94 'passwordsalt' => '${env.password_salt}',
95 'debug' => false, 95 'debug' => false,
96 'dbtype' => 'pgsql', 96 'dbtype' => 'pgsql',
97 'version' => '15.0.4.0', 97 'version' => '16.0.0.9',
98 'dbname' => '${env.postgresql.database}', 98 'dbname' => '${env.postgresql.database}',
99 'dbhost' => '${env.postgresql.socket}', 99 'dbhost' => '${env.postgresql.socket}',
100 'dbtableprefix' => 'oc_', 100 'dbtableprefix' => 'oc_',
@@ -135,6 +135,7 @@ in {
135 'overwrite.cli.url' => 'https://cloud.immae.eu', 135 'overwrite.cli.url' => 'https://cloud.immae.eu',
136 'ldapIgnoreNamingRules' => false, 136 'ldapIgnoreNamingRules' => false,
137 'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory', 137 'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
138 'has_rebuilt_cache' => true,
138 ); 139 );
139 ''; 140 '';
140 }]; 141 }];
@@ -151,14 +152,20 @@ in {
151 in [ occ ]; 152 in [ occ ];
152 153
153 system.activationScripts.nextcloud = { 154 system.activationScripts.nextcloud = {
154 deps = [ ]; 155 deps = [ "secrets" ];
155 text = '' 156 text = let
157 confs = lib.attrsets.mapAttrs (n: v: pkgs.writeText "${n}.json" (builtins.toJSON v)) nextcloud.otherConfig;
158 in
159 ''
156 install -m 0755 -o wwwrun -g wwwrun -d ${varDir} 160 install -m 0755 -o wwwrun -g wwwrun -d ${varDir}
157 install -m 0750 -o wwwrun -g wwwrun -d ${varDir}/phpSessions 161 install -m 0750 -o wwwrun -g wwwrun -d ${varDir}/phpSessions
158 install -D -m 0644 -o wwwrun -g wwwrun ${./nextcloud-config}/* -t ${varDir}/config 162 ${builtins.concatStringsSep "\n" (lib.attrsets.mapAttrsToList (n: v:
163 "install -D -m 0644 -o wwwrun -g wwwrun -T ${v} ${varDir}/config/${n}.json"
164 ) confs)}
159 install -D -m 0600 -o wwwrun -g wwwrun -T /var/secrets/webapps/tools-nextcloud ${varDir}/config/config.php 165 install -D -m 0600 -o wwwrun -g wwwrun -T /var/secrets/webapps/tools-nextcloud ${varDir}/config/config.php
160 ''; 166 '';
161 }; 167 };
168 # FIXME: add a warning when config.php changes
162 system.extraSystemBuilderCmds = '' 169 system.extraSystemBuilderCmds = ''
163 mkdir -p $out/webapps 170 mkdir -p $out/webapps
164 ln -s ${nextcloud} $out/webapps/${webappName} 171 ln -s ${nextcloud} $out/webapps/${webappName}
diff --git a/nixops/modules/websites/tools/cloud/nextcloud-config/mimetypealiases.json b/nixops/modules/websites/tools/cloud/nextcloud-config/mimetypealiases.json
deleted file mode 100644
index 3806e53..0000000
--- a/nixops/modules/websites/tools/cloud/nextcloud-config/mimetypealiases.json
+++ /dev/null
@@ -1,4 +0,0 @@
1{
2 "application/gpx+xml": "gpx",
3 "x-application/kdbx": "kdbx"
4}
diff --git a/nixops/modules/websites/tools/cloud/nextcloud-config/mimetypemapping.json b/nixops/modules/websites/tools/cloud/nextcloud-config/mimetypemapping.json
deleted file mode 100644
index 2db4691..0000000
--- a/nixops/modules/websites/tools/cloud/nextcloud-config/mimetypemapping.json
+++ /dev/null
@@ -1,4 +0,0 @@
1{
2 "gpx": ["application/gpx+xml"],
3 "kdbx": ["x-application/kdbx"]
4}
diff --git a/pkgs/webapps/default.nix b/pkgs/webapps/default.nix
index 6afccde..da38f5f 100644
--- a/pkgs/webapps/default.nix
+++ b/pkgs/webapps/default.nix
@@ -11,6 +11,8 @@ rec {
11 "audioplayer" "bookmarks" "calendar" "contacts" "deck" 11 "audioplayer" "bookmarks" "calendar" "contacts" "deck"
12 "files_markdown" "gpxedit" "gpxpod" "keeweb" "music" 12 "files_markdown" "gpxedit" "gpxpod" "keeweb" "music"
13 "notes" "ocsms" "passman" "spreed" "tasks" 13 "notes" "ocsms" "passman" "spreed" "tasks"
14 "flowupload" "carnet"
15 # FIXME: fix passman for NC 16
14 ]; 16 ];
15 in 17 in
16 lib.attrsets.genAttrs names 18 lib.attrsets.genAttrs names
diff --git a/pkgs/webapps/nextcloud/apps/audioplayer.nix b/pkgs/webapps/nextcloud/apps/audioplayer.nix
index e8cd307..e321002 100644
--- a/pkgs/webapps/nextcloud/apps/audioplayer.nix
+++ b/pkgs/webapps/nextcloud/apps/audioplayer.nix
@@ -1,7 +1,7 @@
1{ buildApp }: 1{ buildApp }:
2buildApp rec { 2buildApp rec {
3 appName = "audioplayer"; 3 appName = "audioplayer";
4 version = "2.6.0"; 4 version = "2.7.0";
5 url = "https://github.com/Rello/${appName}/releases/download/${version}/${appName}-${version}.tar.gz"; 5 url = "https://github.com/Rello/${appName}/releases/download/${version}/${appName}-${version}.tar.gz";
6 sha256 = "08apm7dhnljagcvq8b1dsqcck4nqwmz60bf3mx44xvbhiaq6nim4"; 6 sha256 = "05dylw45hs32agy6wqjy4r2x3h1dxzyzn0378ig6h5a22xd52mik";
7} 7}
diff --git a/pkgs/webapps/nextcloud/apps/bookmarks.nix b/pkgs/webapps/nextcloud/apps/bookmarks.nix
index 3667c16..4632c92 100644
--- a/pkgs/webapps/nextcloud/apps/bookmarks.nix
+++ b/pkgs/webapps/nextcloud/apps/bookmarks.nix
@@ -1,7 +1,7 @@
1{ buildApp }: 1{ buildApp }:
2buildApp rec { 2buildApp rec {
3 appName = "bookmarks"; 3 appName = "bookmarks";
4 version = "0.16.2"; 4 version = "1.0.2";
5 url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}-${version}.tar.gz"; 5 url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}-${version}.tar.gz";
6 sha256 = "0ghk71iyk5xlqsfahg0d0lpp9lparpdnv2qx11a7j64pc9gzcfl4"; 6 sha256 = "1ph123d0pram9a0vq73rn0zw0pyg4l0xqg162b59ds68179m2jfp";
7} 7}
diff --git a/pkgs/webapps/nextcloud/apps/calendar.nix b/pkgs/webapps/nextcloud/apps/calendar.nix
index 1162f57..0812810 100644
--- a/pkgs/webapps/nextcloud/apps/calendar.nix
+++ b/pkgs/webapps/nextcloud/apps/calendar.nix
@@ -1,7 +1,7 @@
1{ buildApp }: 1{ buildApp }:
2buildApp rec { 2buildApp rec {
3 appName = "calendar"; 3 appName = "calendar";
4 version = "1.6.4"; 4 version = "1.7.0";
5 url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}.tar.gz"; 5 url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}.tar.gz";
6 sha256 = "00dijvcvy7snsjslfbyzvpp9anhms22zp1f0zkj89ln33jmana63"; 6 sha256 = "0cgvvgzc2kgs2ng36hzff8rrpw9n58f0hyrr41n3wjkf0iynm56r";
7} 7}
diff --git a/pkgs/webapps/nextcloud/apps/carnet.nix b/pkgs/webapps/nextcloud/apps/carnet.nix
new file mode 100644
index 0000000..61431e5
--- /dev/null
+++ b/pkgs/webapps/nextcloud/apps/carnet.nix
@@ -0,0 +1,7 @@
1{ buildApp }:
2buildApp rec {
3 appName = "carnet";
4 version = "0.15.2";
5 url = "https://github.com/PhieF/CarnetNextcloud/releases/download/v${version}/${appName}-nc-v${version}.tar.gz";
6 sha256 = "1npjb2bgwcfxlf22ygl2hfhfgaigk1kpdk795yc79mx2l1iicmg0";
7}
diff --git a/pkgs/webapps/nextcloud/apps/contacts.nix b/pkgs/webapps/nextcloud/apps/contacts.nix
index f553210..34329ab 100644
--- a/pkgs/webapps/nextcloud/apps/contacts.nix
+++ b/pkgs/webapps/nextcloud/apps/contacts.nix
@@ -1,7 +1,7 @@
1{ buildApp }: 1{ buildApp }:
2buildApp rec { 2buildApp rec {
3 appName = "contacts"; 3 appName = "contacts";
4 version = "3.0.3"; 4 version = "3.1.1";
5 url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}.tar.gz"; 5 url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}.tar.gz";
6 sha256 = "026hfigfzqb1cvq6a7mg9656nkm21c19a6ipqzgv00ycf38qyk95"; 6 sha256 = "1qfn532p1pb4m6q2jzyzlyw4c5qccmq6vj0h2zv9xfkajfvz7i7v";
7} 7}
diff --git a/pkgs/webapps/nextcloud/apps/deck.nix b/pkgs/webapps/nextcloud/apps/deck.nix
index 9b4e8c4..c5737af 100644
--- a/pkgs/webapps/nextcloud/apps/deck.nix
+++ b/pkgs/webapps/nextcloud/apps/deck.nix
@@ -1,7 +1,7 @@
1{ buildApp }: 1{ buildApp }:
2buildApp rec { 2buildApp rec {
3 appName = "deck"; 3 appName = "deck";
4 version = "0.5.2"; 4 version = "0.6.1";
5 url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}.tar.gz"; 5 url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}.tar.gz";
6 sha256 = "1kygzixxdkp3dbma009p3pw0fj8wgcqcv39n7pay78lh6zi3nic7"; 6 sha256 = "1hafgj67zbhs4higf7nyr61p4s31axzxrsq09c4wmcwviz7p7zvs";
7} 7}
diff --git a/pkgs/webapps/nextcloud/apps/files_markdown.nix b/pkgs/webapps/nextcloud/apps/files_markdown.nix
index 9ccfe18..9ed5007 100644
--- a/pkgs/webapps/nextcloud/apps/files_markdown.nix
+++ b/pkgs/webapps/nextcloud/apps/files_markdown.nix
@@ -1,7 +1,7 @@
1{ buildApp }: 1{ buildApp }:
2buildApp rec { 2buildApp rec {
3 appName = "files_markdown"; 3 appName = "files_markdown";
4 version = "2.0.5"; 4 version = "2.0.6";
5 url = "https://github.com/icewind1991/${appName}/releases/download/v${version}/${appName}.tar.gz"; 5 url = "https://github.com/icewind1991/${appName}/releases/download/v${version}/${appName}.tar.gz";
6 sha256 = "1dzvy4c6vff2qmkwqw13dx92xdkafaxgnipswjw44mh0ncc2n9ym"; 6 sha256 = "1ng8gpjl3g1141k1nii59cg005viidlcbsg4x9brzcj25c5qhjjp";
7} 7}
diff --git a/pkgs/webapps/nextcloud/apps/flowupload.nix b/pkgs/webapps/nextcloud/apps/flowupload.nix
new file mode 100644
index 0000000..cbadbda
--- /dev/null
+++ b/pkgs/webapps/nextcloud/apps/flowupload.nix
@@ -0,0 +1,7 @@
1{ buildApp }:
2buildApp rec {
3 appName = "flowupload";
4 version = "0.1.0";
5 url = "https://github.com/e-alfred/${appName}/releases/download/${version}/${appName}.tar.gz";
6 sha256 = "0cai76hcjrwvq32yav0nd9kkhslandp1sj5czz119gsfjlkpalw9";
7}
diff --git a/pkgs/webapps/nextcloud/apps/gpxedit.nix b/pkgs/webapps/nextcloud/apps/gpxedit.nix
index afd2410..b9c267b 100644
--- a/pkgs/webapps/nextcloud/apps/gpxedit.nix
+++ b/pkgs/webapps/nextcloud/apps/gpxedit.nix
@@ -1,7 +1,15 @@
1{ buildApp }: 1{ buildApp }:
2buildApp rec { 2buildApp rec {
3 appName = "gpxedit"; 3 appName = "gpxedit";
4 version = "0.0.10"; 4 version = "0.0.11";
5 url = "https://gitlab.com/eneiluj/gpxedit-oc/wikis/uploads/33d187268c5f6f6a55350d656305701c/${appName}-${version}.tar.gz"; 5 url = "https://gitlab.com/eneiluj/gpxedit-oc/wikis/uploads/18058077d0170256c3f4c9201443d09d/${appName}-${version}.tar.gz";
6 sha256 = "0ynpaxm0xhvcj8xax6rm1w0p6j57wbqidhi7bhn268n483gwl2sw"; 6 sha256 = "1ww32jysjnwxrn8r9fjdfhbfqnzgaakn08m64wcmavx29dd42y6m";
7 otherConfig = {
8 mimetypealiases = {
9 "application/gpx+xml" = "gpx";
10 };
11 mimetypemapping = {
12 "gpx" = ["application/gpx+xml"];
13 };
14 };
7} 15}
diff --git a/pkgs/webapps/nextcloud/apps/gpxpod.nix b/pkgs/webapps/nextcloud/apps/gpxpod.nix
index c2e9a80..6544ac2 100644
--- a/pkgs/webapps/nextcloud/apps/gpxpod.nix
+++ b/pkgs/webapps/nextcloud/apps/gpxpod.nix
@@ -1,7 +1,15 @@
1{ buildApp }: 1{ buildApp }:
2buildApp rec { 2buildApp rec {
3 appName = "gpxpod"; 3 appName = "gpxpod";
4 version = "3.0.1"; 4 version = "3.0.3";
5 url = "https://gitlab.com/eneiluj/gpxpod-oc/wikis/uploads/3f5fbc895de15f11f90582c4872839dc/${appName}-${version}.tar.gz"; 5 url = "https://gitlab.com/eneiluj/gpxpod-oc/wikis/uploads/34af9435d7a2cd8fa915b84f0dda0724/${appName}-${version}.tar.gz";
6 sha256 = "1g3602phrdpybamr4bnk5niv1znmwp19lqyw6d8yxmc84lg99dny"; 6 sha256 = "0v30j5b4ki6nbxqdmnlkrgl1lpg2x2nir9gik6rfj0c3jhmb5mch";
7 otherConfig = {
8 mimetypealiases = {
9 "application/gpx+xml" = "gpx";
10 };
11 mimetypemapping = {
12 "gpx" = ["application/gpx+xml"];
13 };
14 };
7} 15}
diff --git a/pkgs/webapps/nextcloud/apps/keeweb.nix b/pkgs/webapps/nextcloud/apps/keeweb.nix
index cff6bca..99713ee 100644
--- a/pkgs/webapps/nextcloud/apps/keeweb.nix
+++ b/pkgs/webapps/nextcloud/apps/keeweb.nix
@@ -1,12 +1,20 @@
1{ buildApp }: 1{ buildApp }:
2buildApp rec { 2buildApp rec {
3 appName = "keeweb"; 3 appName = "keeweb";
4 version = "0.4.0"; 4 version = "0.5.0";
5 url = "https://github.com/jhass/nextcloud-keeweb/releases/download/v${version}/${appName}-${version}.tar.gz"; 5 url = "https://github.com/jhass/nextcloud-keeweb/releases/download/v${version}/${appName}-${version}.tar.gz";
6 sha256 = "0453kkb0a8vfivmibpwpx4bvhyn64jhns6cdfjacmnvbm6d75nj1"; 6 sha256 = "0wdr6ywlirmac7w1ld5ma7fwb4bykclbxfq2sxwg6pvzfid5vc8x";
7 installPhase = '' 7 installPhase = ''
8 mkdir -p $out 8 mkdir -p $out
9 cp -R . $out/ 9 cp -R . $out/
10 sed -i -e 's/max-version="12"/max-version="16"/' $out/appinfo/info.xml 10 sed -i -e 's/max-version="15"/max-version="16"/' $out/appinfo/info.xml
11 ''; 11 '';
12 otherConfig = {
13 mimetypealiases = {
14 "x-application/kdbx" = "kdbx";
15 };
16 mimetypemapping = {
17 "kdbx" = ["x-application/kdbx"];
18 };
19 };
12} 20}
diff --git a/pkgs/webapps/nextcloud/apps/music.nix b/pkgs/webapps/nextcloud/apps/music.nix
index 4cb1c9b..1c7181a 100644
--- a/pkgs/webapps/nextcloud/apps/music.nix
+++ b/pkgs/webapps/nextcloud/apps/music.nix
@@ -1,7 +1,7 @@
1{ buildApp }: 1{ buildApp }:
2buildApp rec { 2buildApp rec {
3 appName = "music"; 3 appName = "music";
4 version = "0.9.3"; 4 version = "0.9.5";
5 url = "https://github.com/owncloud/${appName}/archive/v${version}.tar.gz"; 5 url = "https://github.com/owncloud/${appName}/archive/v${version}.tar.gz";
6 sha256 = "1x4c2v8hnm9yi3fzjglfwd2brzn99v8zavgfczc5jfj30v3n555z"; 6 sha256 = "0dx136z7anmi18harc1v2hyfdaq568lqf3wpy9hgx309ggb4wwzx";
7} 7}
diff --git a/pkgs/webapps/nextcloud/apps/notes.nix b/pkgs/webapps/nextcloud/apps/notes.nix
index 1edb5f4..23d6a06 100644
--- a/pkgs/webapps/nextcloud/apps/notes.nix
+++ b/pkgs/webapps/nextcloud/apps/notes.nix
@@ -1,7 +1,7 @@
1{ buildApp }: 1{ buildApp }:
2buildApp rec { 2buildApp rec {
3 appName = "notes"; 3 appName = "notes";
4 version = "2.5.1"; 4 version = "2.6.0";
5 url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}.tar.gz"; 5 url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}.tar.gz";
6 sha256 = "1albzqqsdirzyw8vhvs7r0qm2wqp8vm9vmxm4crhncd85bk01hmh"; 6 sha256 = "1b1vc8plv4mpsxl7mgwgrcrswphclsm9xa89vxf3s4xzlwwq11c4";
7} 7}
diff --git a/pkgs/webapps/nextcloud/apps/ocsms.nix b/pkgs/webapps/nextcloud/apps/ocsms.nix
index a1d5e0e..bd77295 100644
--- a/pkgs/webapps/nextcloud/apps/ocsms.nix
+++ b/pkgs/webapps/nextcloud/apps/ocsms.nix
@@ -6,6 +6,7 @@ buildApp rec {
6 sha256 = "0sgfbmy1c8rgzjvf9snc7rzgp8aqsc65zfwgi6qcsf2g6gam5n7a"; 6 sha256 = "0sgfbmy1c8rgzjvf9snc7rzgp8aqsc65zfwgi6qcsf2g6gam5n7a";
7 installPhase = '' 7 installPhase = ''
8 sed -i -e "/addScript.*devel/d" -e "s@//\(.*addScript.*app.min\)@\1@" templates/main.php 8 sed -i -e "/addScript.*devel/d" -e "s@//\(.*addScript.*app.min\)@\1@" templates/main.php
9 sed -i -e 's/max-version="15.0"/max-version="16.0"/' appinfo/info.xml
9 mkdir -p $out 10 mkdir -p $out
10 cp -R . $out/ 11 cp -R . $out/
11 ''; 12 '';
diff --git a/pkgs/webapps/nextcloud/apps/spreed.nix b/pkgs/webapps/nextcloud/apps/spreed.nix
index dba9bae..a958470 100644
--- a/pkgs/webapps/nextcloud/apps/spreed.nix
+++ b/pkgs/webapps/nextcloud/apps/spreed.nix
@@ -1,7 +1,7 @@
1{ buildApp }: 1{ buildApp }:
2buildApp rec { 2buildApp rec {
3 appName = "spreed"; 3 appName = "spreed";
4 version = "5.0.2"; 4 version = "6.0.0";
5 url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}-${version}.tar.gz"; 5 url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}-${version}.tar.gz";
6 sha256 = "0z9zhpkq485lhwirc2f04427rd47hzv0r8frz72dkrszb037qjvv"; 6 sha256 = "14rcskp4pdcf0g816cdp070c8pzrj33fg2w7jb3af8maf1d77306";
7} 7}
diff --git a/pkgs/webapps/nextcloud/apps/tasks.nix b/pkgs/webapps/nextcloud/apps/tasks.nix
index 950bd2d..18d1d36 100644
--- a/pkgs/webapps/nextcloud/apps/tasks.nix
+++ b/pkgs/webapps/nextcloud/apps/tasks.nix
@@ -1,7 +1,9 @@
1{ buildApp }: 1{ buildApp }:
2buildApp rec { 2buildApp rec {
3 appName = "tasks"; 3 appName = "tasks";
4 version = "0.9.8"; 4 version = "0.10.0-alpha3";
5 url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}.tar.gz"; 5 #url = "https://github.com/nextcloud/${appName}/releases/download/v${version}/${appName}.tar.gz";
6 sha256 = "089m124lfsfk09fqj50x9n7zndq97jp5afgb8s001rpmzym4g6ny"; 6 # FIXME: master branch until supported version for NC 16
7 url = "https://github.com/nextcloud/tasks/files/3116580/tasks.tar.gz";
8 sha256 = "0cx5m1ilq1yqnf5v0c5y01jf5mhwd664m1kq3zabbf3n29j96cay";
7} 9}
diff --git a/pkgs/webapps/nextcloud/default.nix b/pkgs/webapps/nextcloud/default.nix
index c3471fe..0287f75 100644
--- a/pkgs/webapps/nextcloud/default.nix
+++ b/pkgs/webapps/nextcloud/default.nix
@@ -1,13 +1,15 @@
1{ varDir ? "/var/lib/nextcloud", lib, stdenv, fetchurl }: 1{ varDir ? "/var/lib/nextcloud", otherConfig ? {}, lib, stdenv, fetchurl }:
2let 2let
3 buildApp = { appName, version, url, sha256, installPhase ? "mkdir -p $out && cp -R . $out/" }: 3 buildApp = { appName, version, url, sha256, otherConfig ? {}, installPhase ? "mkdir -p $out && cp -R . $out/" }:
4 stdenv.mkDerivation rec { 4 stdenv.mkDerivation rec {
5 name = "nextcloud-app-${appName}-${version}"; 5 name = "nextcloud-app-${appName}-${version}";
6 inherit version; 6 inherit version;
7 phases = "unpackPhase installPhase"; 7 phases = "unpackPhase installPhase";
8 inherit installPhase; 8 inherit installPhase;
9 src = fetchurl { inherit url sha256; }; 9 src = fetchurl { inherit url sha256; };
10 passthru.appName = appName; 10 passthru = {
11 inherit appName otherConfig;
12 };
11 }; 13 };
12 withApps = apps: package.overrideAttrs(old: { 14 withApps = apps: package.overrideAttrs(old: {
13 name = "${old.name}-with-apps"; 15 name = "${old.name}-with-apps";
@@ -16,17 +18,25 @@ let
16 builtins.concatStringsSep "\n" ( 18 builtins.concatStringsSep "\n" (
17 map (value: "ln -sf ${value} $out/apps/${value.appName}") apps 19 map (value: "ln -sf ${value} $out/apps/${value.appName}") apps
18 )); 20 ));
21
22 passthru.otherConfig = with lib.attrsets; with lib.lists; let
23 zipped = zipAttrs ([old.otherConfig or {}] ++ map (v: v.otherConfig) apps);
24 in
25 {
26 mimetypealiases = foldr (h: prev: prev // h) {} zipped.mimetypealiases;
27 mimetypemapping = mapAttrs (_: v: unique (flatten v)) (zipAttrs zipped.mimetypemapping);
28 };
19 passthru.apps = apps; 29 passthru.apps = apps;
20 passthru.withApps = moreApps: old.withApps (moreApps ++ apps); 30 passthru.withApps = moreApps: old.withApps (moreApps ++ apps);
21 }); 31 });
22 32
23 package = stdenv.mkDerivation rec { 33 package = stdenv.mkDerivation rec {
24 name = "nextcloud-${version}"; 34 name = "nextcloud-${version}";
25 version = "15.0.4"; 35 version = "16.0.0";
26 36
27 src = fetchurl { 37 src = fetchurl {
28 url = "https://download.nextcloud.com/server/releases/${name}.tar.bz2"; 38 url = "https://download.nextcloud.com/server/releases/${name}.tar.bz2";
29 sha256 = "0xwg7p31y1pkjk1pzygh9shpqxnfkafrab52j7in7xblq53v0zgq"; 39 sha256 = "0bj014vczlrql1w32pqmr7cyqn9awnyzpi2syxhg16qxic1gfcj5";
30 }; 40 };
31 41
32 installPhase = '' 42 installPhase = ''
@@ -38,7 +48,7 @@ let
38 48
39 passthru = { 49 passthru = {
40 apps = []; 50 apps = [];
41 inherit buildApp withApps varDir; 51 inherit otherConfig buildApp withApps varDir;
42 }; 52 };
43 meta = { 53 meta = {
44 description = "Sharing solution for files, calendars, contacts and more"; 54 description = "Sharing solution for files, calendars, contacts and more";