Nextcloud: Difference between revisions
imported>Heartbeast42 mNo edit summary |
imported>Alicimo Missing the license variable in fetchNextcloudApp causes the example to fail. Also expanded the given example to show the use of combining packaged apps with those additionally fetched. |
||
Line 32: | Line 32: | ||
# Instead of using pkgs.nextcloud28Packages.apps, | # Instead of using pkgs.nextcloud28Packages.apps, | ||
# we'll reference the package version specified above | # we'll reference the package version specified above | ||
extraApps = | extraApps = { | ||
inherit (config.services.nextcloud.package.packages.apps) news contacts calendar tasks; | |||
}; | }; | ||
extraAppsEnable = true; | extraAppsEnable = true; | ||
Line 41: | Line 41: | ||
The apps mail, news and contacts will be installed and enabled in your instance automatically. Note that the Nextcloud version specified in <code>package</code> and <code>extraApps</code> need to match one of the stable Nextcloud versions available in the NixOS repository. | The apps mail, news and contacts will be installed and enabled in your instance automatically. Note that the Nextcloud version specified in <code>package</code> and <code>extraApps</code> need to match one of the stable Nextcloud versions available in the NixOS repository. | ||
To manually fetch and install packages, you need to add them via the helper script <code>fetchNextcloudApp</code> by specifing the release tarball as url | To manually fetch and install packages, you need to add them via the helper script <code>fetchNextcloudApp</code> by specifing the release tarball as url, the correct checksum and the license. Additional apps can be found via [https://apps.nextcloud.com Nextcloud app store], while the [https://github.com/helsinki-systems/nc4nix nc4nix] provides an easy reference for the required variables. Note that the declarative specification of apps via this approach requires manual updating of package version (url) and checksum for a new release. | ||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | {{file|/etc/nixos/configuration.nix|nix|<nowiki> | ||
Line 48: | Line 48: | ||
[...] | [...] | ||
extraApps = { | extraApps = { | ||
inherit (config.services.nextcloud.package.packages.apps) news contacts calendar tasks; | |||
memories = pkgs.fetchNextcloudApp { | |||
sha256 = "sha256- | sha256 = "sha256-Xr1SRSmXo2r8yOGuoMyoXhD0oPVm/0/ISHlmNZpJYsg="; | ||
url = "https://github.com/pulsejet/memories/releases/download/v6.2.2/memories.tar.gz"; | |||
license = "agpl3"; | |||
}; | |||
}; | }; | ||
extraAppsEnable = true; | extraAppsEnable = true; |