-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
himalaya: adjust module for v1.0.0-beta
#4839
Conversation
v1.0.0-beta
4e65739
to
edbf3df
Compare
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 looks good (haven’t had a chance to run it). I didn’t expect watch to be added already. My only concern is those cuddled attrset braces with the if
statement had me thrown for a loop & I think has a negative impacted on readability.
The watch (and notify) were already there before, I just refactored the code to match the new watch API which combines both previous watch (running shell commands) and previous notify (send system notifications). I agree about the Thank you for your feedback! |
da69fae
to
5ce6c1b
Compare
@soywod do you have a recent rebase from the default branch atop this? |
5ce6c1b
to
3fb6710
Compare
@soywod do you have a recent rebase from the default branch atop this?
I just rebased my branch.
|
Going to bed, but I will certainly check tomorrow since my config is obviously broken & I hate emailing on my phone :)
--
toastal ไข่ดาว | https://toast.al
PGP: 7944 74b7 d236 dab9 c9ef e7f9 5cce 6f14 66d4 7c9e
|
For whatever it's worth while trying to rebuild my configuration off of this branch I got the following error
Here is a minimal config which seems to trigger the same breakage: {...}: {
home = {
stateVersion = "24.05";
username = "test";
homeDirectory = /home/test;
};
accounts.email = {
maildirBasePath = ".mail";
accounts.test = {
primary = true;
address = "[email protected]";
userName = "[email protected]";
realName = "Test Testerton";
notmuch.enable = true;
himalaya.enable = true;
};
};
programs.notmuch.enable = true;
programs.himalaya.enable = true;
} This was using the current |
357e987
to
5f8e067
Compare
For whatever it's worth while trying to rebuild my configuration off
of this branch I got the following error
I pushed a fix, it should be good now!
|
Yup the home manager config now builds on my end! Himalaya seems unhappy with the generated configuration now though.
|
unknown variant `notmuch`, expected one of `maildir`, `imap`, `smtp`,
`sendmail`
The Notmuch backend is not available by default, it requires the
"notmuch" cargo feature.
The problem is that the Notmuch backend was temporarily be disabled in
the "v1.0.0-beta" (which is the one available on nixpkgs-unstable). It
has been reactivated in the "v1.0.0-beta.2", which is not yet available
on nixpkgs-unstable:
<NixOS/nixpkgs#284358>
Once the "v1.0.0-beta.2" lands on nixpkgs-unstable, you will be able to
adjust your configuration this way:
programs.himalaya = {
enable = true;
package = pkgs.himalaya.override { buildFeatures = ["notmuch"]; };
};
|
Does it make sense to force the "notmuch" cargo feature from the
home-manager module? Something like:
home.packages = [ himalaya.package.override {
buildFeatures = lib.optional notmuchEnabled "notmuch";
} ]
|
I personally would like that, maybe just complaining if it's not enabled would also work. I don't know how other hm modules handle it or if it makes sense in the broader picture I'm afraid.
Another possibility could be complaining from Himalaya that it was compiled without notmuch support. I did not find the current error very enlightening.
Jan 28, 2024 2:39:12 PM Clément DOUIN ***@***.***>:
…
Does it make sense to force the "notmuch" cargo feature from the
home-manager module? Something like:
home.packages = [ himalaya.package.override {
buildFeatures = lib.optional notmuchEnabled "notmuch";
} ]
—
Reply to this email directly, view it on GitHub[#4839 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/ALEG4AKWJCLYN675ZU7COWDYQ2ZO5AVCNFSM6AAAAABBJKDEESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTG4YTKNBWGY].
You are receiving this because you commented.
[Tracking image][https://github.com/notifications/beacon/ALEG4AMFDWEUGNEISRY43VLYQ2ZO5A5CNFSM6AAAAABBJKDEESWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTSCD5QU.gif]
|
@rycee what is the best approach for this kind of situation? |
I got the config to build but … $ himalaya account list
Error: cannot parse config file at "$XDG_CONFIG_HOME/himalaya/config.toml"
Caused by:
TOML parse error at line 1, column 1
|
1 | display-name = "toastal"
| ^^^^^^^^^^^^^^^^^^^^^^^^
invalid type: integer `46`, expected struct TomlAccountConfig |
I got the config to build but …
There is no way to know the correct location of errors at the moment. It
is a known problem, see:
- <toml-rs/toml#589 (comment)>
- <serde-rs/serde#1183>
Could you share your home-manager config as well as the generated TOML?
|
Well that kinda sucks ha. DM‘d my config on Matrix. |
Well that kinda sucks ha.
Yes, I know. It is really frustrating because the issue does not come
from Himalaya. But I am working on a work around, I let you know!
|
5f8e067
to
65a170d
Compare
I cannot understand why https://github.com/nix-community/home-manager/actions/runs/7702476916/job/20990851373?pr=4839 Edit: somehow the derivation path points to a dummy one: |
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.
Wait or not, this does work for me now. Thanks for the help @soywod
65a170d
to
2a5ed41
Compare
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.
Tested new changes.
All good to merge? |
It works well enough for me & the beta2 has been merged into nixpkgs. |
Cool, thanks! Merged to master now 🙂 |
Description
Adjust module to match the
v1.0.0-beta
. I just open the PR as draft (waiting for NixOS/nixpkgs#278088).Checklist
Change is backwards compatible.
Code formatted with
./format
.Code tested through
nix-shell --pure tests -A run.all
ornix develop --ignore-environment .#all
using Flakes.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
Maintainer CC
@toastal