Nextcloud: Difference between revisions

m Add config for public-facing whiteboard server
Onny (talk | contribs)
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 14: Line 14:
   config.adminpassFile = "/etc/nextcloud-admin-pass";
   config.adminpassFile = "/etc/nextcloud-admin-pass";
   config.dbtype = "sqlite";
   config.dbtype = "sqlite";
  settings = {
    # Some sane defaults required to satisfy Nextcloud configuration check
    maintenance_window_start = 1;
    default_phone_region = "DE";
    log_type = "systemd";
    serverid = 0;
  };
};
};
</nowiki>|name=/etc/nixos/configuration.nix|lang=nix}}
</nowiki>|name=/etc/nixos/configuration.nix|lang=nix}}
Line 25: Line 32:
=== Apps ===
=== Apps ===


[https://github.com/NixOS/nixpkgs/blob/2852f35f477e0f55e68b5f5e6d5a92242c215efc/pkgs/servers/nextcloud/packages/31.json Some apps] (use the file named <code><version>.json</code>, where version is the installed Nextcloud version), which are already packaged on NixOS, can be installed directly with the following example configuration:
[https://github.com/NixOS/nixpkgs/blob/0d7bf2685cc69bcb51430bbc0493e221f9c21c2d/pkgs/servers/nextcloud/packages/34.json Some apps] (use the file named <code><version>.json</code>, where version is the installed Nextcloud version), which are already packaged on NixOS, can be installed directly with the following example configuration:


{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
Line 31: Line 38:
   enable = true;                   
   enable = true;                   
   [...]
   [...]
   # Instead of using pkgs.nextcloud29Packages.apps or similar,
   # Instead of using pkgs.nextcloud34Packages.apps or similar,
   # we'll reference the package version specified in services.nextcloud.package
   # we'll reference the package version specified in services.nextcloud.package
   extraApps = {
   extraApps = {
Line 38: Line 45:
   extraAppsEnable = true;
   extraAppsEnable = true;
};
};
</nowiki>}}
</nowiki>|name=/etc/nixos/configuration.nix|lang=nix}}


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.
Line 546: Line 553:


For easy deployment, there's the [https://apps.nextcloud.com/apps/richdocumentscode richdocumentscode app] which bundles the CODE server. While being less performant than a standalone deployment of the CODE server, this solution does not require an additional service to be deployed and managed externally from NextCloud. Unfortunately the richdocumentscode app bundles the CODE server as an AppImage and therefore does not work out of the box on NixOS. Follow https://github.com/NixOS/nixpkgs/issues/339798 if you want to get informed about packaging progress. Also CODE standalone is currently not packaged in nixpkgs (https://github.com/NixOS/nixpkgs/issues/218878).  
For easy deployment, there's the [https://apps.nextcloud.com/apps/richdocumentscode richdocumentscode app] which bundles the CODE server. While being less performant than a standalone deployment of the CODE server, this solution does not require an additional service to be deployed and managed externally from NextCloud. Unfortunately the richdocumentscode app bundles the CODE server as an AppImage and therefore does not work out of the box on NixOS. Follow https://github.com/NixOS/nixpkgs/issues/339798 if you want to get informed about packaging progress. Also CODE standalone is currently not packaged in nixpkgs (https://github.com/NixOS/nixpkgs/issues/218878).  
=== Memories ===
To enable hardware acceleration, nextcloud will need access to the graphics card with e.g:<syntaxhighlight lang="nix">
  users.users.nextcloud.extraGroups = [ "video" ];
  systemd.services.phpfpm-nextcloud.serviceConfig = {
    DeviceAllow = "/dev/dri/renderD128 rw";
    PrivateDevices = lib.mkForce false;
  };
</syntaxhighlight>You will still need to enable the relevant app configuration through "Administration Settings > Memories > HW Acceleration".
[[Category:Server]]
[[Category:Server]]
[[Category:Applications]]
[[Category:Applications]]
[[Category:Web Applications]]
[[Category:Web Applications]]
[[Category:NixOS Manual]]
[[Category:NixOS Manual]]