hyprland-community / hyprnix

35 stars 0 forks source link

Incompatible with Catppuccin flake #9

Closed spikespaz closed 1 month ago

spikespaz commented 1 month ago

Noticed with @kcoderhtml's dotfiles.

       error: The option `home-manager.users.kierank.wayland.windowManager.hyprland.settings' does not exist. Definition values:
       - In `/nix/store/i68cbq46n9bd8vpahr6ccc34sqzh63kg-source/modules/home-manager/hyprland.nix':
           {
             _type = "if";
             condition = true;
             content = {
               source = [
           ...

Catppuccin relies on wayland.windowManager.hyprland.settings which is not defined by (in fact it is removed by) Hyprnix.

Should this flake create a hidden option settings for compatibility? Or should the Catppuccin flake respect both modules? What about shipping a compat module with this flake?

spikespaz commented 1 month ago

@kcoderhtml Can you try again, using github:hyprland-community/hyprnix/rewrite and wayland.windowManager.hyprland.fufexan.enable = true? Catppuccin should work with the fix.

kcoderhtml commented 1 month ago

trying right now!

kcoderhtml commented 1 month ago

Nix is saying that the fufexan option doesn't exist

error: The option `home-manager.users.kierank.wayland.windowManager.hyprland.fufexan' does not exist.

https://kierank.pastes.sh/1722810208681180940 https://github.com/kcoderhtml/dots/tree/a409434b19c1f1a58b0b55a83683c714c7c5fa58

spikespaz commented 1 month ago

@kcoderhtml I'm very sorry, I forgot to push.

I expect this might not work, but assuming the error message is that it doesn't know what to do with an option value of type package, I know what to do next.

kcoderhtml commented 1 month ago

You were totaly right! it errored with some flip trace thingy

sorry it took me so long to run it again 😭

https://kierank.pastes.sh/1722900598008983227

spikespaz commented 1 month ago

Huh, that isn't what I was expecting. It gets further than that on my machine.

The error message, for this one, is easy to grok:

The option home-manager.users.kierank.wayland.windowManager.hyprland.fufexan does not exist.

For some reason. How did you update the flake? Did you use:

nix flake lock --update-input hyprnix

Because this is the same issue as your previous message (paste), before I pushed the changes.

But I was expecting something to happen when Catppuccin tries to add a lib.types.package or path value to wayland.windowManager.hyprland.config.source.

kcoderhtml commented 1 month ago

Oh I didn’t realize you needed to do that 😅 I thought nix auto updated; well you learn something new every day! I’ll fix that in just a moment

kcoderhtml commented 1 month ago

Just ran it and surprisingly after deleting my config folder nothing blew up! it just rebuilt and hyprland loaded up just fine! I had to stop it because it didn't have any config yet but i'll work on porting those over from my dots tmrw

spikespaz commented 1 month ago

That's good, now if it works, can you cat ~/.config/hypr/hyprland.conf | wl-copy to make sure Catppuccin files are sourced near the top?

kcoderhtml commented 1 month ago

sorry to take so long to get back to you but here you go! it all seems to work great!

env = NIXOS_OZONE_WL,1

exec-once = /nix/store/g56mlyricr13dqsra9ag6kh8m5v66r70-dbus-1.14.10/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP
exec-once = systemctl --user start hyprland-session.target
exec-once = /nix/store/yzyln67v2a1fkmf1s0n4gf1b6bgrxvic-lxqt-policykit-2.0.0/bin/lxqt-policykit-agent
exec-once = /nix/store/74hjm7szpmllyv65gzxx6lhz64hnxaqm-xhost-1.0.9/bin/xhost +local:

source = /home/kierank/.config/hypr/keybinds.conf
source = /nix/store/5nqbr4x6yb7bmny12m1fda75brsh8naz-source/themes/macchiato.conf
source = /nix/store/y8ci9s9a4ypl6mr7hqxg6yv2x2c9xm8s-hyprland-green-accent.conf
source = /nix/store/aan4vsxbqpg5y6l6nyqw91hk217sbnpq-hyprland-cursors.conf

animations {
    bezier = easeInBack, 0.360000, 0, 0.660000, -0.560000
    bezier = easeInCirc, 0.550000, 0, 1, 0.450000
    bezier = easeInCubic, 0.320000, 0, 0.670000, 0
    bezier = easeInExpo, 0.700000, 0, 0.840000, 0
    bezier = easeInOutBack, 0.680000, -0.600000, 0.320000, 1.600000
    bezier = easeInOutCirc, 0.850000, 0, 0.150000, 1
    bezier = easeInOutCubic, 0.650000, 0, 0.350000, 1
    bezier = easeInOutExpo, 0.870000, 0, 0.130000, 1
    bezier = easeInOutQuad, 0.450000, 0, 0.550000, 1
    bezier = easeInOutQuart, 0.760000, 0, 0.240000, 1
    bezier = easeInOutQuint, 0.830000, 0, 0.170000, 1
    bezier = easeInOutSine, 0.370000, 0, 0.630000, 1
    bezier = easeInQuad, 0.110000, 0, 0.500000, 0
    bezier = easeInQuart, 0.500000, 0, 0.750000, 0
    bezier = easeInQuint, 0.640000, 0, 0.780000, 0
    bezier = easeInSine, 0.120000, 0, 0.390000, 0
    bezier = easeOutBack, 0.340000, 1.560000, 0.640000, 1
    bezier = easeOutCirc, 0, 0.550000, 0.450000, 1
    bezier = easeOutCubic, 0.330000, 1, 0.680000, 1
    bezier = easeOutExpo, 0.160000, 1, 0.300000, 1
    bezier = easeOutQuad, 0.500000, 1, 0.890000, 1
    bezier = easeOutQuart, 0.250000, 1, 0.500000, 1
    bezier = easeOutQuint, 0.220000, 1, 0.360000, 1
    bezier = easeOutSine, 0.610000, 1, 0.880000, 1
    bezier = linear, 0, 0, 1, 1

}

misc {
    disable_autoreload = true
}
spikespaz commented 1 month ago

Great to see that it works. I am a little surprised that the hyprlang serializer wasn't confused by /nix/store/aan4vsxbqpg5y6l6nyqw91hk217sbnpq-hyprland-cursors.conf, a store path which is not a directory. Somehow, this option value of type package is being coerced to a string, so it works correctly by accident. I suppose I'll learn more in the future when I break it by accident.

kcoderhtml commented 1 month ago

Thanks for adding this!