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.
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.0instead ofsetuptools~=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-mediaplayeranddbus-idle.Also, for lnxlink I'm having to remove
asynciofrom 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:
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.