Skip to content

nextcloud32: notify_push broken with sqlite #476262

@d4g

Description

@d4g

Nixpkgs version

  • Unstable (26.05)

Describe the bug

Using sqlite on nextcloud, the string DB url is created in a wrong way:

export DATABASE_URL="sqlite://nextcloud@localhost/nextcloud"

Instead of

export DATABASE_URL=sqlite:///var/lib/nextcloud/data/nextcloud.db

For now i patched the service:

  serviceConfig = {
    # Replace the script-based ExecStart with a direct command
    ExecStart = lib.mkForce [
      ""
      "${pkgs.nextcloud-notify_push}/bin/notify_push /var/lib/nextcloud/config/config.php"
    ];

    # Set the environment variable BEFORE exec
    Environment = [
      "DATABASE_URL=sqlite:///var/lib/nextcloud/data/nextcloud.db"
    ];
    };
  };

I think that setting the DATABASE_URL via environment of the systemd service is also probably the better way.

Steps to reproduce

  • Configure nextcloud with sqlite
  • Enable notify_push
  • Read the errors in the log, that the file cannot be found.

Expected behaviour

The URL is correctly created for sqlite

Screenshots

No response

Relevant log output

Additional context

No response

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.14.11-4-pve, NixOS, 26.05 (Yarara), 26.05pre919991.cad22e7d996a
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.31.2+1
  • channels(root): "nixos"
  • nixpkgs: /nix/store/ricxl8ir2gagb2ys4lhzgqrkcanvzsj7-nixos/nixos

As container on proxmox

Notify maintainers

@bachp @britter @dotlambda @Ma27 @provokateurin


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions