rxyhn / yoru

夜 - Yoru | Aesthetic and Beautiful Awesome Environment :first_quarter_moon:
GNU General Public License v3.0
3.46k stars 196 forks source link

NixOS support [Feature Req] #141

Open AdsonCicilioti opened 1 year ago

AdsonCicilioti commented 1 year ago

I couldn't fully reproduce on NixOS.

I tried to investigate where it was breaking. I found problems in signal/playerctl.lua which only worked in .cli() mode and not in .lib() mode. Then it was the turn of the lock_screen module, and in this a very large lua code file that I am not good at. then. I had difficulty. Wibar, what caught my attention the most, also has a lot of code to investigate.

I managed to supply all external dependencies, but still I couldn't reproduce fully.

I would love for there to be an adapted version for NixOS or for you, as a creator and coder, to give the best fit for this incredible distro.

javacafe01 commented 1 year ago

@AdsonCicilioti For NixOS, you'll need to write an overlay for the AwesomeWM package in order to get the LGI libs to work (such as playerctl and upower).

Instead, if you are using flakes, I'd recommend using this flake repo. I wrote the AwesomeWM derivation for this repo. Or, just take a look here for reference.

The important part of the overlay is the following attribute:

GI_TYPELIB_PATH = "${prev.playerctl}/lib/girepository-1.0:"
                  + "${prev.upower}/lib/girepository-1.0:"
                  + "${prev.networkmanager}/lib/girepository-1.0:"
                  + old.GI_TYPELIB_PATH;
javacafe01 commented 1 year ago

@AdsonCicilioti For NixOS, you'll need to write an overlay for the AwesomeWM package in order to get the LGI libs to work (such as playerctl and upower).

Instead, if you are using flakes, I'd recommend using this flake repo. I wrote the AwesomeWM derivation for this repo. Or, just take a look here for reference.

The important part of the overlay is the following attribute:

GI_TYPELIB_PATH = "${prev.playerctl}/lib/girepository-1.0:"
                  + "${prev.upower}/lib/girepository-1.0:"
                  + "${prev.networkmanager}/lib/girepository-1.0:"
                  + old.GI_TYPELIB_PATH;

@AdsonCicilioti Lmk if this works for you!