Repository navigation
Description
When we are done fixing this NixOS related issues I'd like to contribute docs for the NixOS installation and maybe add lnxlink do the nixpkgs repo.
You can see in these 2 files the work necessary to get it to run:
First setting up the package, getting the executable to run:
https://codeberg.org/giggio/home-manager-config/src/commit/9f437b27901d2ee01e17b428e4f87aee1d8680ea/pkgs/python/lnxlink.nix
Then setting up the systemd service:
https://codeberg.org/giggio/home-manager-config/src/commit/9f437b27901d2ee01e17b428e4f87aee1d8680ea/services/lnxlink.nix
The service is looking good, when we finish fixing the issues I already opened it will be running fine. I believe you could also update your systemd service to better use the data, log and configuration directories as I'm doing in mine, plus the extra security features.
The package is taking a little more work than I'd like. I'm having to patch some of your dbus projects because the wheel and setuptools versions in nixpkgs are super new and conflict with your existing definitions.
I'm not a Python programmer and I don't know if there would be a problem removing that definition of maybe asking for a minimum version, instead of setting one up (like setuptools>=69.2.0 instead of setuptools~=69.2.0). I'm not even sure if that is allowed in the Python build tools.
When adding the packages to nixpkgs I can add you as a maintainer of the package in nixpkgs too, if you'd like. I'd probably need to add all those that are not there yet. Currently I am adding definitions for nvsmi, pyadmgpuinfo, dbus-networkdevices, dbus-mediaplayer and dbus-idle.
Also, for lnxlink I'm having to remove asyncio from pyproject.toml and requirements.txt. It seems it is not necessary to have them there, as they are part of the stdlib or something? Is that possible to be removed?
If those are added to nixpkgs, then running the service will be as easy as defining the configuration, something like:
services.lnxlink = {
enable = true;
config = { ... }; # the lnxlink configuration
secretsFile = "path to your secrets environment file"; # optional
}Maybe I could also add some properties to better define the setting that the user is required to set, we can discuss that later.
I can also then send a PR to your docs later.
Let me know what you think.
Cheers.
Activity
Remove asyncio stdlib #257
bkbilly commentedon Jul 9, 2026
Asyncio didn't used to exist as a system library, but it seems that the python versions currently supported by LNXlink don't need this dependency.
For the setuptools, you should not have any issues installing the latest versions, though I haven't tried it myself.
I haven't used NixOS before, but I'd be more than happy to help you any way I can to add support for this.
giggio commentedon Jul 10, 2026
Ok, I updated to the current HEAD and could remove the references to asyncio. But not the patches for setuptools and wheel:
I get this error when this is not there (end of logs):
bkbilly commentedon Jul 10, 2026
I am not sure if this helps, but I looked the nixpkgs repository and I found a random python package called
jtblwhich uses the setuptools and wheel dependencies, but in a different way. You can see this here:https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/jt/jtbl/package.nix
giggio commentedon Jul 10, 2026
It seems that to use
python3Packages.buildPythonApplicationwe'd need asetup.pyfile. Docs:https://wiki.nixos.org/wiki/Python#Package_a_Python_application
Isn't there a way to say that the app depends on versions
xand above, something likesetuptools>=68.0.0?bkbilly commentedon Jul 11, 2026
I've pushed an update which removes the
wheeldependency and usessetuptools>=61.0.Hopefully this will make things easier to package LNXlink.
EDIT: I've also done this change on the other dependencies which I've pushed them to version
2026.7.0: dbus-idle, dbus-mediaplayer, dbus-networkdevicesgiggio commentedon Jul 12, 2026
Ok, I've updated my build configuration, it is much simpler now. I could remove
wheelfrom the build and I don't need to patchpyproject.tomlanymore. That goes for all your projects! Thanks!Here is the current build configuration:
https://codeberg.org/giggio/home-manager-config/src/commit/d649dc957d540c5d010f99e816c36c51125d36c6/pkgs/python/lnxlink.nix
Build with:
nix build --impure --expr '(import ./python.nix { pkgs = import <nixpkgs> {}; }).withPackages (python-pkgs: [ python-pkgs.lnxlink ])'(from the
pythondirectory and inspect the 8000resultdirectory)Now, when the next version of lnxlink is published I'll be able to update the configuration to take directly from Pypi, just as I'm doing with the others. After that, I can send a PR to nixpkgs for the package, work through it, then after that is integrated I can send a PR to home-manager for service integration. And after that we can add docs to lnxlink on how to use it with Nix. It'll take a few weeks but it is going to be super easy.
bkbilly commentedon Jul 13, 2026
The new build configuration seems much simpler now.
I noticed that the library dbus_notification is missing which I've also updated to the
2026.7.0version.I've released the version
2026.7.0of LNXlink, so you can proceed with the rest of the process to publish this to NixOS.Thank you for all your help with this!
giggio commentedon Jul 15, 2026
Ok, I updated the service to the latest version and I added dbus_notification and it is working fine.
I'll start the process to include it in nixpkgs. Would you like to be added as a maintainer there?
bkbilly commentedon Jul 15, 2026
I would love to be added as a maintainer.
giggio commentedon Jul 28, 2026
Now that we've closed the last issue to get it all working, I'll start working on my local machine in a configuration that I can upstream to nixpkgs. I'm kinda busy with other things right now, but I'll get it done.
Thanks for all the support in all the issues I've opened, @bkbilly !
github-actions commentedon Aug 22, 2026
No activity on this issue recently. Make sure you update to the latest version of LNXlink to check if the issue has been resolved.
If no further activity occurs, the issue will be closed.
giggio commentedon Aug 23, 2026
I'll work on it.
giggio commentedon Sep 12, 2026
@bkbilly I have an initial implementation, coming from this commit: https://codeberg.org/giggio/home-manager-config/commit/5811714b60ba81afeef229acb9f45683bea674ce
This is my usage of the module, so this is what would be needed for a user of lnxlink to set it up with Nix: https://codeberg.org/giggio/home-manager-config/src/commit/5811714b60ba81afeef229acb9f45683bea674ce/services/lnxlink/lnxlink.nix
This is the most important file to analyze. Do you approve the way I chose to set up usage?
Now, the implementation:
These are the packages I need to provide to Nix, besides lnxlink there are others: https://codeberg.org/giggio/home-manager-config/src/commit/5811714b60ba81afeef229acb9f45683bea674ce/pkgs/python/lnxlink
You are not a maintainer yet on these files because that will only show up when I send the first PR, when I'll update the maintainers nix references.
This is the service module itself: https://codeberg.org/giggio/home-manager-config/src/commit/5811714b60ba81afeef229acb9f45683bea674ce/services/lnxlink/module.nix
Let me know what you think, I can work with what you may need to improve.
bkbilly commentedon Sep 13, 2026
I've noticed that you have specific modules enabled by default.
I think it would be useful to add a comment on the modules section to mention that if this is
null, then it will load everything.Overall I can't find any issue with this implementation.
It looks straightforward on how people can use it.
giggio commentedon Sep 14, 2026
My configuration is loading several modules, but that won't go to nixpkgs, what will go is the
module.nixfile, which setsmodulesto null.If that is all, I can start to work on submitting it to nixpkgs. Ok?
bkbilly commentedon Sep 18, 2026
That's perfectly fine.
giggio commentedon Oct 6, 2026
Opened PR in nixpkgs: NixOS/nixpkgs#570735