-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
gotify-desktop: init module #8208
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
base: master
Are you sure you want to change the base?
Conversation
| gotify-dekstop-str-token = ./gotify-dekstop-str-token.nix; | ||
| gotify-dekstop-command-token = ./gotify-dekstop-command-token.nix; | ||
| gotify-dekstop-extra-config = ./gotify-dekstop-extra-config.nix; |
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.
Would be helpful to have tests that verify settings not included when not configured.
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.
See comment bellow.
modules/services/gotify-desktop.nix
Outdated
| (lib.hm.assertions.assertPlatform "services.gotify-desktop" pkgs lib.platforms.linux) | ||
| ]; | ||
|
|
||
| xdg.configFile."gotify-desktop/config.toml".source = configToml; |
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.
Generally prefer checking if anything has been configured, at all before creating a file.
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.
The url and token settings are required, so I elected to give them their own module option. They are added to the user set optional settings. Meaning settings is guaranteed to be set with a valid module definition.
The original implementation was subpar so this wasn't obvious. I changed the implementation be more nixy.
802bd6d to
3cf5447
Compare
Co-authored-by: Austin Horstman <[email protected]>
3cf5447 to
dac9ea5
Compare
Description
Add a new service module: gotify-desktop a Gotify message forward daemon.
Notable things:
Checklist
Change is backwards compatible.
Code formatted with
nix fmtornix-shell -p treefmt nixfmt deadnix keep-sorted --run treefmt.Code tested through
nix run .#tests -- test-allornix-shell --pure tests -A run.all.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
If this PR adds an exciting new feature or contains a breaking change.