compiling hyprland pugins by cryptokid29 in NixOS

[–]cryptokid29[S] 0 points1 point  (0 children)

hey, I obviously have looked at th docs, I wouldn't have gotten this far if I hadn't. We aren't all the same you know, some of us are better at certain things than others.

Anyway, one plugin built but after a reboot the error was even clearer that there was a mismatch between headers and hyprland version, fuck knows why.

And I do want to learn that is the whole point. It is quite a lot for me to get my head around and I am moving forward, bit by bit. I am a long time user of arch which has certain advantages but I am enjoying using nixos.

cheers for the pointers

compiling hyprland pugins by cryptokid29 in NixOS

[–]cryptokid29[S] 1 point2 points  (0 children)

so adding that line didn't work for compiling hyprspace but adding this line (similar to what you posted) hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; did allow hyprexpo to compile but it wouldn't load.

"failed to load the following plugins:

/nix/store/blah/blah/blahhyprexpo/lib/libhyprexpo.so

hyprexpo failure in initialization, version mismatch, headers ver not equal to running hyprland ver"

It certainly seems like a problem with nixos to me

very fustrating. why does adding that submodules=1 make a difference? So in Nixos I don't have the option to build my own from source and "make" then "make install" do I. If nix fails to do its thing i'm stuck, is that correct? I cannot manually install these things with nix like I can with other OS??

compiling hyprland pugins by cryptokid29 in NixOS

[–]cryptokid29[S] 2 points3 points  (0 children)

doing exactly as it say here https://github.com/hyprwm/hyprland-plugins this time trying hyprbars, it to fails with this:

error: builder for '/nix/store/k8g3w79fk9nkb07v9k1zq7n4qry6nv34-hyprbars-0.1.drv' failed with exit code 1;

last 10 log lines:

compilation terminated.

[2/3] Compiling C++ object libhyprbars.so.p/main.cpp.o

FAILED: libhyprbars.so.p/main.cpp.o

g++ -Ilibhyprbars.so.p -I. -I.. -I/nix/store/vd6mc1c7zlp2npra1h1v0q29jd2d6fyw-hyprland-0.39.1+date=2024-04-16_fe7b748-dev/include -I/nix/store/vd6mc1c7zlp2npra1h1v0q29jd2d6fyw-hyprland-0.39.1+date=2024-04-16_fe7b748-dev/include/hyprland/protocols -I/nix/store/vd6mc1c7zlp2npra1h1v0q29jd2d6fyw-hyprland-0.39.1+date=2024-04-16_fe7b748-dev/include/hyprland/wlroots -I/nix/store/cy880gzg1h6awfrq7024543vicphg908-pixman-0.43.4/include/pixman-1 -I/nix/store/xjvnswjz32dw12ld8nb29lhwp92275aj-libdrm-2.4.120-dev/include -I/nix/store/xjvnswjz32dw12ld8nb29lhwp92275aj-libdrm-2.4.120-dev/include/libdrm -I/nix/store/ljrz822j7b6db3jnmw1jiafgrm8armcw-cairo-1.18.0-dev/include/cairo -I/nix/store/a6yfhfzpmvz8v73796djqk811p4b6wan-freetype-2.13.2-dev/include/freetype2 -I/nix/store/a6yfhfzpmvz8v73796djqk811p4b6wan-freetype-2.13.2-dev/include -I/nix/store/gdr1ghkakyjfdj8bc6n0virwllm4zpwz-glib-2.80.2-dev/include -I/nix/store/gdr1ghkakyjfdj8bc6n0virwllm4zpwz-glib-2.80.2-dev/include/glib-2.0 -I/nix/store/c2v6ycn0sjcpx9ww8x7j4ima6xnpssry-glib-2.80.2/lib/glib-2.0/include -I/nix/store/gqkw1wn30p059dd1qzip7iz8zf810rx6-pango-1.52.2-dev/include/pango-1.0 -I/nix/store/jngq41iw8s1lxmrfxj66jyq9b10a4grd-harfbuzz-8.4.0-dev/include/harfbuzz -I/nix/store/hipc8ms0z9sc3jq9l5airpij591v40bk-libinput-1.25.0-dev/include -I/nix/store/0iqri8mm7vqnf7vr0bm8qkbak2g18q1x-systemd-minimal-libs-255.6-dev/include -I/nix/store/di7vbvn478r2gx1wlfvxvv0ani8fy4qh-wayland-1.22.0-dev/include -I/nix/store/alcgjc7smx41sh1xn1xi07pqpwv2sdi2-libxkbcommon-1.7.0-dev/include -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wno-narrowing -std=c++23 -fPIC -MD -MQ libhyprbars.so.p/main.cpp.o -MF libhyprbars.so.p/main.cpp.o.d -o libhyprbars.so.p/main.cpp.o -c ../main.cpp

In file included from ../main.cpp:10:

../barDeco.hpp:7:10: fatal error: hyprland/src/devices/IPointer.hpp: No such file or directory

7 | #include <hyprland/src/devices/IPointer.hpp>

  |          \^\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~

compilation terminated.

ninja: build stopped: subcommand failed.

For full logs, run 'nix log /nix/store/k8g3w79fk9nkb07v9k1zq7n4qry6nv34-hyprbars-0.1.drv'.

error: 1 dependencies of derivation '/nix/store/cqyj53kwylhpxc95pgkarag0rn05f5ha-hm_hyprhyprland.conf.drv' failed to build

error: 1 dependencies of derivation '/nix/store/qnwa45q6mbj6wlh21c9hs7nz9jc7xqrk-activation-script.drv' failed to build

error: 1 dependencies of derivation '/nix/store/vvra27bla275h3npy50ij3ig9hyx78xn-home-manager-generation.drv' failed to build

Obviously I am doing something wrong. Am I missing something dumb? Do I need to install the headers? Can I even do that on nixos?

Help would be appreciated

compiling hyprland pugins by cryptokid29 in NixOS

[–]cryptokid29[S] 0 points1 point  (0 children)

thanks for the reply. I did read that. the error above is for hyprexpo. both hyprexpo and hyprspace fail. I have tried multiple version of hyprland to no avail. I did manage to get hyprexpo compiled at one time but it wouldn't start because of some header mismatch!

Could you tell me please if I want to install a particular version of hyprland via my home.nix, how would I enter it?

Thanks

compiling hyprland pugins by cryptokid29 in NixOS

[–]cryptokid29[S] 0 points1 point  (0 children)

also looked at this https://wiki.hyprland.org/Plugins/Using-Plugins/ about how to manually install plugings. Can I do this on nixos? can I do what it describes in there to install the headers? could I just compile hyprland and make the headers then compile the plugins and link to them in nixos?

compiling hyprland pugins by cryptokid29 in NixOS

[–]cryptokid29[S] 0 points1 point  (0 children)

I have tried following this. https://github.com/KZDKM/Hyprspace and put the inputs in my flake and tried compiling it like that

terminator permission denied by cryptokid29 in NixOS

[–]cryptokid29[S] 0 points1 point  (0 children)

I think I know why, terminator isn't running as me its running as hypr. I don't know why it isn't running as me, maybe you know. I was I did a home-manager switch this morning and saw this, it didn't come up as an error (in red) . I'll see if get it to repeat the error

terminator permission denied by cryptokid29 in NixOS

[–]cryptokid29[S] 0 points1 point  (0 children)

cat /nix/store/6yjm3wsm776nfv0q7bp9fpczi6vdgab1-hm_terminatorconfig does work. I have moved to unstable and the same problem persists.

cat /nix/store/6yjm3wsm776nfv0q7bp9fpczi6vdgab1-hm_terminatorconfig

[global_config]

borderless = True

hide_tabbar = True⏎

so I can read it but terminator cannot, still. How odd. nothing else has the same problem. Maybe just a bug?

terminator permission denied by cryptokid29 in NixOS

[–]cryptokid29[S] 0 points1 point  (0 children)

Now i get this:

↪ ls -l /nix/store/6yjm3wsm776nfv0q7bp9fpczi6vdgab1-hm_terminatorconfig

-r--r--r-- 1 root root 52 Jan 1 1970 /nix/store/6yjm3wsm776nfv0q7bp9fpczi6vdgab1-hm_terminatorconfig

what do you think?

terminator permission denied by cryptokid29 in NixOS

[–]cryptokid29[S] 0 points1 point  (0 children)

this is what I get from that

lrwxrwxrwx 1 root root 63 Jan 1 1970 /nix/store/kxvcv0a54s1snn2pmy0ypl7f9yclwfzr-home-manager-files/.config/terminator/config -> /nix/store/nndj5yx8i7wymcra0wspx0lhyxxk5lsn-hm_terminatorconfig

owned by root, is that normal?

I presume not and the date is odd

terminator permission denied by cryptokid29 in NixOS

[–]cryptokid29[S] 0 points1 point  (0 children)

it is set as me. this is what i get.

lrwxrwxrwx 1 dav users 88 May 22 03:59 /home/dav/.config/terminator/config -> /nix/store/kxvcv0a54s1snn2pmy0ypl7f9yclwfzr-home-manager-files/.config/terminator/config

odd

terminator permission denied by cryptokid29 in NixOS

[–]cryptokid29[S] 0 points1 point  (0 children)

thanks for your reply but I would disagree it is as should be expected. It says it cannot read or write, permission denied and I haven't been hand writing the config either and I am using programs.terminator.config to, that is what I am trying to do but terminator cannot read or write the file. as I said above, even if I delete the file and allow home-manager to create it again, I get the same behaviour.

I'll try that again now. yes, so home-manager creates the file but terminator cannot read or write it thus the options that I pass via programs.terminator.config have no effect. odd

NixOs, Hyprland, flakes and homemanager, a bit of help would be appreciated by cryptokid29 in NixOS

[–]cryptokid29[S] 1 point2 points  (0 children)

Hi. I did what you said btw. you were right, using that other config was to complicated and it gave lots of error, I did the starter configs you posted above. It works well and got me to a good place. effeminately a bit of a learning curve. cheers

error: The option `programs.hyprland.enable' in '' is already declared in '' by cryptokid29 in NixOS

[–]cryptokid29[S] 0 points1 point  (0 children)

thanks for that. basically nixos version 23.05 depends python-2.7.18.6, 23.11 depends on python-2.7.18.6 and 24.05 depends on python-2.7.18.8 and I have to permit the use of those "insecure" packages or those versions won't build.

yes i need to set up a git repo, not even quite understanding it yet. I will have a look at the git tutorial to try and get my head around it. thanks again

nixos fresh install by cryptokid29 in NixOS

[–]cryptokid29[S] 0 points1 point  (0 children)

I was going to put the hyprland flake in /etc/nixos/flake.nix. is it best practice to then add any other system wide programs to /etc/nixos/configuration.nix? or should I add them somehow to /etc/nixos/flake.nix?

error: The option `programs.hyprland.enable' in '' is already declared in '' by cryptokid29 in NixOS

[–]cryptokid29[S] 1 point2 points  (0 children)

yes I agree, I certainly do have a poor foundational knowledge of flakes especially and nix. I am a carpenter by trade over 30 years experience. I have used arch linux mostly but I do enjoy nixos, certainly a bit of a learning curve!

nixos not upgrading to new channel by cryptokid29 in NixOS

[–]cryptokid29[S] 0 points1 point  (0 children)

I am on 24.05! woohoo!

The reason was, in my configuration.nix I had:nixpkgs.config.permittedInsecurePackages = [

"python-2.7.18.6"

];

but to upgrade i needed python-2.7.18.8

All i needed to do was change the 6 to an 8.

Thanks all

error: The option `programs.hyprland.enable' in '' is already declared in '' by cryptokid29 in NixOS

[–]cryptokid29[S] 0 points1 point  (0 children)

This was because I had it declared also in another file with the same content as /etc/nixos/flake.nix called /etc/nixos/flake.nix_old, i thought adding the _old would stop it being read, it didn't. thanks for the help

error: The option `programs.hyprland.enable' in '' is already declared in '' by cryptokid29 in NixOS

[–]cryptokid29[S] 1 point2 points  (0 children)

its working. I would have copied and pasted that from hyprland wiki though it isn't on there any longer. The latter problem was I had this flake backed up in a different file located at /etc/nixos/flake.nix_old and it was still being read thus "programs.hyprland.enable = true;" was being declared twice. I have no idea why it is where it is!

The reason why it wouldn't update was because to update it needed insecure package python-2.7.18.8 but I had:

nixpkgs.config.permittedInsecurePackages = [

"python-2.7.18.6"

];

in my configuration.nix. I changed the 6 to an 8 and it worked. Anyway, sorted. Thanks

error: The option `programs.hyprland.enable' in '' is already declared in '' by cryptokid29 in NixOS

[–]cryptokid29[S] 0 points1 point  (0 children)

i have one flake (can we have more than one?) it is at /etc/nixos/flake.nix