hyprland-community / hyprnix

35 stars 0 forks source link

bug: The option `home' does not exist #8

Closed kcoderhtml closed 1 month ago

kcoderhtml commented 1 month ago

Hi! I'm pretty new to nix so its completely possible that i'm just doing something super obvious and stupid but when I try to enable hyprnix following the your dotfiles @spikespaz (specificaly those here: https://github.com/spikespaz/dotfiles/tree/odyssey/users/jacob/hyprland) i'm getting the below error. I've attached my dotfiles below and i've spent 3 days trying to figure this out before creating an issue (i was afraid i just did something simple wrong but i can't figure out what i did 😭). Thanks in advance for your help!

warning: Git tree '/home/kierank/etc/nixos' is dirty
error:
       … while calling the 'seq' builtin

         at /nix/store/114462g9fhfa5ck1ssribfdh7wlk9m1s-source/lib/modules.nix:322:18:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          323|         _module = checked (config._module);

       … while calling the 'throw' builtin

         at /nix/store/114462g9fhfa5ck1ssribfdh7wlk9m1s-source/lib/modules.nix:298:18:

          297|                     ''
          298|             else throw baseMsg
             |                  ^
          299|         else null;

       error: The option `home' does not exist. Definition values:
       - In `/nix/store/dn32pdagrpwxfj84bx68hgnlmn6mlyln-source/moonlark/hyprland':
           {
             _type = "if";
             condition = true;
             content = {
               packages = [
           ...

https://github.com/kcoderhtml/dots/tree/77f1a8ac18483222c409a0bc3b4cd35661a263ef

spikespaz commented 1 month ago

I looked through your config and it looks like an outright copy paste. I'm guessing the problem is that you tried to use my color functions, which you don't have, and that the name of the flake is wrong where it is imported (using the old name hyprland-nix). I'll take another look tonight or tomorrow.

Hyprnix definitely needs a proper guide, because my personal flake is intertwined with other irrelevant things, and doesn't serve as a minimal example very well.

In the meantime, can you build your config with --show-trace so that I can see where eval is touching my code?

spikespaz commented 1 month ago

https://github.com/kcoderhtml/dots/blob/77f1a8ac18483222c409a0bc3b4cd35661a263ef/moonlark/hyprland/config.nix#L3

You don't have my lib overlay. I have expanded lib with lib.extends (lib.composeManyExtensions [ inputs.bird-nix-lib.lib.overlay inputs.hyprnix.lib.overlay self.lib.overlay ]) which I would not recommend for you. Define your own color functions (you can see my definitions here and the palette here).

Though, looking at your default.nix, you have already commented out config.nix and others. I originally thought the module attribute wasn't found here, but it does appear to match your flake's input (but the name of the flake is Hyprnix :smiley:). That isn't the problem.

Then, I went to look at where you import moonlark and notice that it is in your nixosConfigurations set in flake.nix. This is wrong, this is a Home Manager module, not a NixOS module.

I don't use HM as a NixOS module, but see that you do. This means the modules are a little different. When it says the home option is missing, perhaps for you, it is supposed to be user.users.yourname.home-manager.home or something?

kcoderhtml commented 1 month ago

ah thank you! i'll see if i can fix that!

spikespaz commented 1 month ago

If you get closer and still need help, feel free to use this as a questions thread. It would help me build an FAQ and write some docs.

kcoderhtml commented 1 month ago

I just tried enabling it again and it gave the same error; i used a mvc of just wayland.windowManager.hyprland.enable = true; and importing the Hypernix module into home manager but it still didn't work. The trace is here: https://kierank.pastes.sh/1722021761454688994 and the home manager config here: https://github.com/kcoderhtml/dots/blob/99d5bedafdf0f72ddb8524e66741d8e31f465014/home-manager/home.nix

spikespaz commented 1 month ago

Looking closer with a local copy of your flake shows me that the Catppuccin flake relies on Fufexan's HM module, and uses those options whether you enable it or not. I'll have to think of a workaround when I get home.

kcoderhtml commented 1 month ago

Thank you for looking into it!