nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
6.7k stars 1.76k forks source link

bug: himalaya maildir error #3512

Open tasmo opened 1 year ago

tasmo commented 1 year ago

The expression in line 40 cannot work.

https://github.com/nix-community/home-manager/blob/0f8bf4f92efa3c6168705b49a6788abb3612033a/modules/programs/himalaya.nix#L40

When switching I get the error message:

error: attribute 'maildirBasePath' missing

This snipped might work instead:

maildir-root-dir = "${config.accounts.email.maildirBasePath}/${cfg.maildir.path}";

But I don´t know how to test it so I do not make a PR right now.

tasmo commented 1 year ago

@toastal Do you have an idea?

toastal commented 1 year ago

Not entirely sure. I don't have this config value on my side, but maybe this could explain one of the errors I was getting.

toastal commented 1 year ago

@soywod maybe we should take a peek at this?? :D

soywod commented 1 year ago

@soywod maybe we should take a peek at this?? :D

I already fixed it on my fork, I'm just waiting to release the next version (https://github.com/soywod/himalaya/pull/433) and I will open the PR!

stale[bot] commented 1 year ago

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

SiriusStarr commented 1 year ago

I assume this will be fixed by #3664

soywod commented 1 year ago

I assume this will be fixed by #3664

Exactly!

stale[bot] commented 1 year ago

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

soywod commented 1 year ago

@SiriusStarr do you confirm that it is fixed?

SiriusStarr commented 1 year ago

I have been unable to get himalaya to work, but for reasons unrelated to this bug. The derivation forces an imap config even if maildir is enabled, since imap isn't null. And manually setting the account backend results in no emails being found at all.

So I believe this is fixed, but I cannot confirm as I cannot get himalaya working.

soywod commented 1 year ago

The derivation forces an imap config even if maildir is enabled, since imap isn't null. And manually setting the account backend results in no emails being found at all.

I'm not sure to understand what you try to achieve. What kind of account would you like to configure? An IMAP? A Maildir? An IMAP synchronized locally with a Maildir?

SiriusStarr commented 1 year ago

I'd like to use notmuch for the backend, with lieer used to synchronize, but the derivation contains the following: https://github.com/nix-community/home-manager/blob/c85d9137db45a1c9c161f4718b13cc3bd4cbd173/modules/programs/himalaya.nix#L14C1-L18

      imapEnabled = !isNull account.imap;
      maildirEnabled = !imapEnabled && !isNull account.maildir
        && !account.notmuch.enable;
      notmuchEnabled = !imapEnabled && !isNull account.maildir
        && account.notmuch.enable;

which forces IMAP to be used if IMAP info is set for the account, even if maildir or notmuch is set for the account, and IMAP info is automatically set for the account if the account flavor is gmail.com (https://github.com/nix-community/home-manager/blob/c85d9137db45a1c9c161f4718b13cc3bd4cbd173/modules/accounts/email.nix#L455C1-L461C11), and lieer requires the flavor to be set to gmail.com.

soywod commented 1 year ago

In fact we should check first if notmuch is enabled, then IMAP and finally maildir (kind of default one). Would this fix your issue?

SiriusStarr commented 1 year ago

That makes much more sense to me. I have a PR up for that (as well as fixing the wrong location of the notmuch DB) as #4195.

stale[bot] commented 11 months ago

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.