1## Updating apps
2
3To regenerate the nixpkgs nextcloudPackages set, run:
4
5```
6./generate.sh
7```
8
9After that you can commit and submit the changes in a pull request.
10
11## Adding apps
12
13**Before adding an app and making a pull request to nixpkgs, please first update as described above in a separate commit.**
14
15To extend the nextcloudPackages set, add a new line to the corresponding json
16file with the id of the app:
17
18- `nextcloud-apps.json` for apps
19
20The app must be available in the official
21[Nextcloud app store](https://apps.nextcloud.com).
22https://apps.nextcloud.com. The id corresponds to the last part in the app url,
23for example `breezedark` for the app with the url
24`https://apps.nextcloud.com/apps/breezedark`.
25
26Then regenerate the nixpkgs nextcloudPackages set by running:
27
28```
29./generate.sh
30```
31
32**Make sure that in this update, only the app added to `nextcloud-apps.json` gets updated.**
33
34After that you can commit and submit the changes in a pull request.
35
36## Usage with the Nextcloud module
37
38The apps will be available in the namespace `nextcloud31Packages.apps` (and for older versions of Nextcloud similarly).
39Using it together with the Nextcloud module could look like this:
40
41```
42{
43 services.nextcloud = {
44 enable = true;
45 package = pkgs.nextcloud31;
46 hostName = "localhost";
47 config.adminpassFile = "${pkgs.writeText "adminpass" "hunter2"}";
48 extraApps = with pkgs.nextcloud31Packages.apps; {
49 inherit mail calendar contact;
50 };
51 extraAppsEnable = true;
52 };
53}
54```
55
56Adapt the version number in the Nextcloud package and nextcloudPackages set
57according to the Nextcloud version you wish to use. There are several supported
58stable Nextcloud versions available in the repository.