nixos/seafile: add persistent user, configurable storage path, and gc service#290104
nixos/seafile: add persistent user, configurable storage path, and gc service#290104melvyn2 wants to merge 1 commit intoNixOS:masterfrom
Conversation
48047da to
6b0e2af
Compare
|
@greizgh looks you weren't auto-requested by the bot since the module is missing the |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/3863 |
Sorry, completely missed that. This lgtm! Thanks for your contribution, this was deep down on my todo list and I never got the time to look into GC. |
|
Added you and @schmittlauch to the maintainers for this module, so we can have the maintainer approval tag hopefully. |
| if [[ $installedMajor == $pkgMajor && $installedMinor == $pkgMinor ]]; then | ||
| : | ||
| else | ||
| echo "Server not upgraded yet" >&2 |
There was a problem hiding this comment.
| if [[ $installedMajor == $pkgMajor && $installedMinor == $pkgMinor ]]; then | |
| : | |
| else | |
| echo "Server not upgraded yet" >&2 | |
| if [[ $installedMajor != $pkgMajor && $installedMinor != $pkgMinor ]]; then | |
| echo "Server not upgraded yet" >&2 |
There was a problem hiding this comment.
Was kept to match the main script, but that isn't too useful I guess.
| ''; | ||
| }; | ||
|
|
||
| seaf-gc = { |
There was a problem hiding this comment.
Can we easily deduplicate more things?
|
Seahub needs to be updated anyways so it can build again, version 10 is using django 3 (marked insecure), and there's no PR yet to update to 11. I'll take a look at this again once that PR's in motion. |
|
Forgot to include it, update PR is #318727. Switching to draft until that's merged... |
|
Closing in favor of #318727 |
Description of changes
Disable
DynamicUserfor seafile in favor of a persistent configurable service user and group. This allows moving the storage directory out of the systemd-managedStateDirectory(previously, external paths could be bind-mounted or symlinked into the state directory, but UID reassignments meant having to manually and slowlychownthe entire storage).This also allows access by other services, such as by a garbage-collection timer also added here.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.