1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-24 18:16:21 +03:00
Commit graph

20 commits

Author SHA1 Message Date
Sandro Jäckel
72b9742768
nixos/nextcloud-notify_push: add nextcloud-setup
without it notify might start to early and then fail 5 times before
nextcloud is even ready.
2025-03-23 00:27:09 +01:00
Maximilian Bosch
6c4f93e113
Merge: nixos/nextcloud: use LoadCredential to read secrets (#367433) 2025-03-07 10:58:29 +01:00
Maximilian Bosch
432d274c81
nixos/nextcloud-notify_push: use RestartMode=direct
`nextcloud-notify_push.service` requires
`nextcloud-notify_push-setup.service`. If the latter fails (e.g. because
of Nextcloud not being there yet), the push service would also fail with
result 'dependency'.

RestartMode=direct doesn't put a unit into failed state IF it's about to
be restarted again. That way, `nextcloud-notify_push` will await several
restart attempts. Only if the unit fails due to a rate-limit (i.e. too
many restarts), the push service will also fail.

If the startup is still too slow, it may make sense for administrators to
configure higher intervals between the start attempts with RestartSec.
2025-03-05 17:27:04 +01:00
Sandro
e47c5369ed
nixos/nextcloud-notify_push: turn off keepalive_timeout, proxy_buffering (#364937) 2025-02-02 22:20:53 +01:00
networkException
2ce1e84103
nixos/nextcloud: use LoadCredential to read secrets
This patch adds support for using systemd's LoadCredential
feature to read various secret files used by nextcloud service
units.

Previously credentials had to be readable by the nextcloud user,
this is now no longer required.

The nextcloud-occ wrapper script has been adjusted to use
systemd-run for loading credentials when being called from
outside a service.

In detail this change touches various details of the module:

- The nix_read_secret() php function now takes the name of a
  file relative to the path specified in the CREDENTIALS_DIRECTORY
  environment variable.
- The nix_read_secret() now exits with error code 1 instead of
  throwing a RuntimeException as this will properly error out
  the nextcloud-occ script
- Only the nextcloud-setup service unit has the adminpass credential
  added in addition to the other credentials
- Uses of ExecCondition= in nextcloud-cron and nextcloud-update-db
  have been replaced by a shell conditional as ExecCondition currently
  doesn't support credentials
- The phpfpm-nextcloud service now runs a preStart script to make
  the credentials it gets readable by the nextcloud user as the
  unit runs as root but the php process itself as nextcloud.
- To invoke occ notify_push:setup when using nextcloud notify_push
  a new service has been added that replaces the preStart script
  in nextcloud-notify_push.service. This has been done as the
  main executable only needs the database password credential.

Co-authored-by: lassulus <lassulus@lassul.us>
2025-01-21 13:13:34 +01:00
Sandro Jäckel
a81d5824e8
nixos/nextcloud-notify_push: add nextcloudUrl option
to have better control over the URL for when bendDomainToLocalhost is
not good enough
2024-12-15 22:43:12 +01:00
Sandro Jäckel
b43f31e53a
nixos/nextcloud-notify_push: turn off keepalive_timeout, proxy_buffering
Just a safe guard in case it was configured in a higher level as
otherwise notify_push would break.
2024-12-13 17:58:08 +01:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Sandro
9dd1f943ec
nixos/nextcloud-notify_push: fix defaultText rendering 2024-10-30 23:48:18 +01:00
Richard Steinmetz
b9ca8498aa nixos/nextcloud-notify_push: fix connecting to mysql via socket 2024-10-14 13:30:05 +02:00
Eric Wolf
7c0937d668
nixos/nextcloud-notify_push: use Type=notify
This prevents the post start script from running
before necessary sockets have been created.

It also prevents an unused shell from being kept around
by using `exec` to make `notify_push` the main process.
2024-06-02 23:19:07 +02:00
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
Jonas Heinrich
e1c0d281b2 nixos/nextcloud: Rename extraOptions to settings 2024-01-26 14:22:49 +01:00
figsoda
701bcdbead nixos: fix typos 2023-05-19 22:31:04 -04:00
Sandro Jäckel
da15c5054e
nixos/nextcloud-notify_push: add bendDomainToLocalhost 2023-05-03 22:41:23 +02:00
Nicola Squartini
3b758d4aab
nixos/nextcloud: fix notify_push configuration parse error
notify_push is unable to parse functions in PHP configuration, so we
avoid loading the `override.config.php` file.
2023-04-24 17:45:44 +02:00
ajs124
bdb0566f8b nixos/nextcloud-notify_push: use lib.genAttrs 2023-02-21 15:53:27 +01:00
ajs124
6c24a28ea6 nixos/nextcloud-notify_push: add some restart config to the service 2023-02-21 15:05:17 +01:00
ajs124
671bd1ef7a nixos/nextcloud-notify_push: add database options 2023-02-21 15:05:16 +01:00
ajs124
1f0aa74c8f nixos/nextcloud-notify_push: init 2023-02-21 15:05:16 +01:00