Skip to content
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/wallabag: init #54863

Open
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@Nadrieril
Copy link
Contributor

commented Jan 29, 2019

Motivation for this change

wallabag is a convenient little service that allows to save links to read them later. It has an android app and a firefox extension.
This PR adds a module that sets up a wallabag instance with nginx and php-fpm. I also added a nixos test.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@Nadrieril Nadrieril requested a review from Infinisil as a code owner Jan 29, 2019

@Nadrieril Nadrieril referenced this pull request Jan 29, 2019

Merged

wallabag: 2.3.2 -> 2.3.6 #54864

4 of 10 tasks complete
@immae
Copy link

left a comment

Hi,
Just a note: I didn’t check the effect of the WALLABAG_DATA environment variable, so I may be wrong, but wallabag install expects to be able write to: ./var, ./data (sqlite database) and ./web/assets (for thumbnail images).

Could you check that modifying only WALLABAG_DATA is enough to handle the three locations?

@Nadrieril

This comment has been minimized.

Copy link
Contributor Author

commented Jan 31, 2019

I have the service running with this configuration on my server, and so far it seems to work well. I have only tried with postgresql, but sqlite should work since you can override the database location as needed.

@immae

This comment has been minimized.

Copy link

commented Jan 31, 2019

@Nadrieril : how about the assets? It may be unseen if you don’t watch for it. If you want an example, you can try to import https://nvie.com/posts/a-successful-git-branching-model/ in your wallabag. It should show a custom (not wallabag default) thumbnail in the list

@Nadrieril

This comment has been minimized.

Copy link
Contributor Author

commented Feb 1, 2019

Oh, well spotted ! The assets get stored correctly under $WALLABAG_DATA, but the nginx config I wrote did not serve them correctly. That's now fixed, thanks.

@immae

This comment has been minimized.

Copy link

commented Feb 1, 2019

Thanks for the confirmation @Nadrieril
May I ask how you learned about this environment variable? I see it nowhere in the documentation, nor does a grep return anything (I suppose there are string concatenation somewhere), so I’m a bit puzzled as to how you found it.

@Nadrieril

This comment has been minimized.

Copy link
Contributor Author

commented Feb 1, 2019

Ah yes, it's not from wallabag itself; it was added in the nix package (though not by me):

patches = [ ./wallabag-data.patch ]; # exposes $WALLABAG_DATA
and https://github.com/NixOS/nixpkgs/blob/10dbdd30d1/pkgs/servers/web-apps/wallabag/wallabag-data.patch

@immae

This comment has been minimized.

Copy link

commented Feb 1, 2019

Oh that’s why, thanks a lot!

Show resolved Hide resolved nixos/modules/services/web-apps/wallabag.nix
};

poolConfig = mkOption {
type = types.lines;

This comment has been minimized.

Copy link
@Ekleog

Ekleog Mar 10, 2019

Member

This could be turned into an attrset that's automatically turned into lines via something like toKeyValue {} cfg.poolConfig. This could make the merging behavior more pleasant.

'';
};

conf = mkOption {

This comment has been minimized.

Copy link
@Ekleog

Ekleog Mar 10, 2019

Member

This might deserve an example, or at least a link to wallabag's docs in the description.

@@ -208,6 +208,7 @@ in
upnp = handleTest ./upnp.nix {};
vault = handleTest ./vault.nix {};
virtualbox = handleTestOn ["x86_64-linux"] ./virtualbox.nix {};
wallabag = handleTestOn ["x86_64-linux"] ./wallabag.nix {};

This comment has been minimized.

Copy link
@Ekleog

Ekleog Mar 10, 2019

Member

Does wallabag work only on x86_64-linux?

database_port: null
database_name: wallabag
database_user: wallabag
database_password: password

This comment has been minimized.

Copy link
@Ekleog

Ekleog Mar 10, 2019

Member

Is there a way to not put the database password in the store? I'm thinking it might make sense to just pass the path to the wallabag config file instead of passing the whole file here, in a manner similar to networking.supplicant.*.configFile.path, for security reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.