Open nielsegberts opened 1 year ago
I've tested your module and it appears to be running correctly. I would support you submitting a PR to upstream this.
The only comment I have on the implementation is that the services.filebrowser.baseUrl
option example is misleading/incorrect, since baseurl
upstream seems to actually be a base url path like /filebrowser
rather than a FQDN like the example suggests (there doesn't appear to be documentation for what baseurl
actually does in the upstream docs other than "base url").
When I set baseUrl
to a FQDN like the example suggests, the filebrowser UI was attempting to make requests to https://filebrowser.mydomain.com/filebrowser.mydomain.com
, setting this to ""
fixed the issue.
I was annoyed by the lack of options as well and created my own File Browser module over the weekend: https://github.com/cimm/nixpkgs/commit/92285eb640d6e78b818022702619732cfb8caf73
Only then did I notice this GitHub issue. I should have searched here before spending the time redoing the same work. :man_facepalming: Ah, well, I learned something in the process and took a slightly different approach. I noticed this issue is almost a year old, so have there been any attempts to get it merged?
DynamicUser = "yes";
approach in the systemd unit. It doesn't need a user, but more importantly, it sandboxes the service. This should improve security but also means the dataDir
and database
locations are limited to the /var/lib/filebrowser
path. I'm not claiming this is better; I never wrote a Nix module before, but it might be interesting to discuss?escapeShellArg
all string options to make sure special characters don't break the command.Only then did I notice this GitHub issue. I should have searched here before spending the time redoing the same work.
I haven't looked much into this lately, but if you have improvements to the module I would be awesome if you can make a PR. Feel free to ping me for review and testing.
When creating the pull request, I noticed there was already a pending pull request: #289750. I won't open another one, better focus our efforts on the pending one.
Project description
This is a continuation of https://github.com/NixOS/nixpkgs/issues/122339 to add options to easily set up File Browser now that it's packaged.
I've started development with this commit:
https://github.com/nielsegberts/nixpkgs/commit/6d39a0b8c1896e9fae3b40f0732f3585b1d79f71