srid / emanote

Emanate a structured view of your plain-text notes
https://emanote.srid.ca
Other
796 stars 70 forks source link

Failure to use homeManagerModule #309

Open bolt12 opened 2 years ago

bolt12 commented 2 years ago

Describe the bug When I try to use and import the homeManagerModule I get an error

To Reproduce Steps to reproduce the behavior:

  1. import emanote.homeManageModule
  2. Try to build
  3. See error

Expected behavior No error

Additional context

Here's the error message:

error: attribute 'emanote' missing

at /nix/store/ibdwi8msnjcljwv9j6xzf55azxkggki7-source/nix/home-manager-module.nix:39:19:

38|         type = types.package;
39|         default = pkgs.emanote;
|                   ^
40|         defaultText = "pkgs.emanote";
Did you mean one of emote or remnote?
(use '--show-trace' to show detailed location information)
srid commented 2 years ago

Does it work if you override the default?

package = emanote.packages.${builtins.currentSystem}.default;

https://emanote.srid.ca/tips/nix

bolt12 commented 2 years ago

I get the following error:

error: The option `home' does not exist. Definition values:
- In `/home/bolt/GitHub/nixos/system/machine/rpi/rpi.nix':
{
_type = "if";
condition = true;
content = {
packages = [
...
(use '--show-trace' to show detailed location information)
srid commented 2 years ago

Hmm. I don't use this module; it was added by @rvl originally, so maybe Rodney has ideas?

By the way, one of these days we should refactor and consolidate this module with https://github.com/srid/emanote/blob/master/nix/emanote.nix (at least the options in it).

bolt12 commented 2 years ago

I am trying to use this module on NixOS not home-manager, maybe that has explains it, but I thought they would be compatible. Another option is to write a nixos module, it shouldn't be too hard.

srid commented 2 years ago

Maybe we can expose the service in the flake module. See line 16 and 21 of https://github.com/srid/emanote-template/blob/96a0156a5aae9f6f59ba9f1ea89fa08f0857cdfc/flake.nix

bolt12 commented 2 years ago

Thank you for the suggestion! I think I know why I was having that error but still had not have the chance to test it out!