Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/nextcloud: add an extraPackages option #371084

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion nixos/modules/services/web-apps/nextcloud.nix
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,15 @@ in {
'';
};

extraPackages = mkOption {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the sake of consistency, shouldn't these be added to nextcloud-cron & nextcloud-update-db?
Especially the former may also need things that one would add here.

type = types.listOf types.package;
example = literalExpression "[ pkgs.ffmpeg ]";
description = ''
Extra packages to make available to nextcloud's PATH.
Add `pkgs.ffmpeg` here to enable video thumbnail generation.
'';
};

phpExtraExtensions = mkOption {
type = with types; functionTo (listOf package);
default = all: [];
Expand Down Expand Up @@ -1072,7 +1081,16 @@ in {
phpPackage = phpPackage;
phpEnv = {
NEXTCLOUD_CONFIG_DIR = "${datadir}/config";
PATH = "/run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/usr/bin:/bin";
PATH = lib.makeBinPath (
[
"/run/wrappers"
"/nix/var/nix/profiles/default"
"/run/current-system/sw"
"/usr"
"" # adds "/bin" to PATH
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I meant with

but I'd very much prefer to have one of extraPackages or systemPackages for that.

was to either use these paths xor extraPackages for everything.

Given we have an agreement to go for extraPackages, I'd suggest:

  • we add a warning to the release notes about the removal of these paths in 25.11 (to the 25.05 release notes)
  • remove this section again
  • and use extraPackages everywhere, as mentioned above.

++ cfg.extraPackages
);
};
settings = mapAttrs (name: mkDefault) {
"listen.owner" = config.services.nginx.user;
Expand Down