-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
nixos/fresh-rss: init module #77354
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/fresh-rss: init module #77354
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aanderse First of all thank you for taking care of this so quickly.
These are my remarks after reading through your code without trying out the module so far.
Please also note that I'm relatively new to writing NixOS modules, so take my comments with a grain of salt.
type = types.bool; | ||
default = true; | ||
description = '' | ||
Create the database and database user locally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me this description doesn't make completely clear what this option is about. Together with the assertion below I assume that this is used to create a mysql db on the same machine with socket authentication?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this feedback. You are correct. Any suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
localDB = mkOption {
type = types.bool;
default = true;
description = ''
Create and use a database on the same machine. This allows authenticating to the db without additional credentials.
This currently only applies if database type "mysql" is selected.
'';
};
}; | ||
|
||
services.httpd = { | ||
enable = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it looks like you always activate Apache httpd and use fresh-rss behind it. While this is definitely convenient for quickly getting a full RSS reader service running, it takes away the flexibility.
Other modules like gitea or tt-rss either don't care about the HTTP webserver in front of them at all or do supply a virtual host config for a web server of their choice (in the case of tt-rss it's nginx), but don't enable it by default.
This makes it possible for users to supply an alternative web server frontend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some modules only provide nginx
configuration, some only provide `httpd. Some provide neither. I find this situation regrettable and hope for a day where sysadmins can easily choose and modules support either option.
|
||
phpConfig = writeText "constants.local.php" '' | ||
<?php | ||
safe_define('DATA_PATH', '/var/lib/fresh-rss'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be nice to tie this together with the stateDir
variable defined in the module. Or is there a need to change the directories independently from each other in the package and module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not really configurable in the module either so this should be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My intention is to leave this hardcoded. Whether a module has a configurable state directory or not is left up to the discretion of the module author. It is more work to make the state directory configurable, so I went with not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just always a potential source of issues if you define the same constant at multiple places and then forget to change both at some point.
But yeah, this is just a minor point.
@schmittlauch people who aren't as familiar with a technology often times provide the most valuable feedback as they have fresh eyes and are able to see shortcomings others can't 😄 All feedback welcome. Thanks. Note this is still a work in progress, though. I've done very minimal testing and I'm not convinced this works reliably yet. More to come. |
Hey! I'd love to see this module being included into nixpkgs. Right now we "only" have tt-rss which has a couple of shortcomings and freshrss has a lot of potential. |
@makefu any interest in picking this up? I don't use |
@aanderse low prio is fine for me, i will use ttrss until the time comes :) but thanks for even starting the PR! |
Hello, I'm a bot and I thank you in the name of the community for your contributions. Nixpkgs is a busy repository, and unfortunately sometimes PRs get left behind for too long. Nevertheless, we'd like to help committers reach the PRs that are still important. This PR has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human. If this is still important to you and you'd like to remove the stale label, we ask that you leave a comment. Your comment can be as simple as "still important to me". But there's a bit more you can do: If you received an approval by an unprivileged maintainer and you are just waiting for a merge, you can @ mention someone with merge permissions and ask them to help. You might be able to find someone relevant by using Git blame on the relevant files, or via GitHub's web interface. You can see if someone's a member of the nixpkgs-committers team, by hovering with the mouse over their username on the web interface, or by searching them directly on the list. If your PR wasn't reviewed at all, it might help to find someone who's perhaps a user of the package or module you are changing, or alternatively, ask once more for a review by the maintainer of the package/module this is about. If you don't know any, you can use Git blame on the relevant files, or GitHub's web interface to find someone who touched the relevant files in the past. If your PR has had reviews and nevertheless got stale, make sure you've responded to all of the reviewer's requests / questions. Usually when PR authors show responsibility and dedication, reviewers (privileged or not) show dedication as well. If you've pushed a change, it's possible the reviewer wasn't notified about your push via email, so you can always officially request them for a review, or just @ mention them and say you've addressed their comments. Lastly, you can always ask for help at our Discourse Forum, or more specifically, at this thread or at #nixos' IRC channel. |
I am also interested in this MR, can I know what's left to be done? |
I don't think many people use I don't use this software and have very little interest in finishing this off anymore. Competing priorities, etc... Are you interested in taking this over? |
@aanderse I'm quite new to Nix, and have never packaged anything for I could probably port it to I assume testing is mostly making sure the derivation builds, and probably also running correctly. |
The package is probably good to go. The module does a fair bit of work for the user. We could just ship a package without a module... |
If anyone wants to finish this off please feel free to take over. |
Motivation for this change
#77246
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @schmittlauch