A Nix flake for developing and using blinkstick scripts. This package provides an environment agnostic solution for executing BlinkStick control scripts without depending on system python packages.
-
Import the flake in the inputs of your flake file:
inputs.blinkstick-scripts.url = "github:perstarkse/blinkstick-scripts";
-
Add it to outputs:
outputs = { self, nixpkgs, blinkstick-scripts, ... }: { ... };
-
Include it in your system or user packages:
home.packages = [ ... blinkstick-scripts.packages."x86_64-linux".blinkstick-scripts ];
-
Import the flake in the inputs of your flake file:
inputs.blinkstick-scripts.url = "github:<username>/blinkstick-scripts";
-
Include it in your overlay file:
modifications = final: prev: { ... blinkstick-scripts = inputs.blinkstick-scripts.packages."x86_64-linux".blinkstick-scripts; };
-
Add it to packages:
home.packages = [ ... blinkstick-scripts ];
Once installed, the blinkstick-scripts
command can be used from the terminal with one of the following arguments: 'red', 'white', 'pink', or 'off'. This sets the color of the connected BlinkStick device.
Example:
blinkstick-scripts white
This section provides instructions for building and modifying the blinkstick-scripts
package, as well as how to enter the development environment.
To build the package, use the following command:
nix build .#blinkstick-scripts
The resulting binary will be placed in a result/
directory at the root of the project.
The python script is written using pkgs.writeScriptBin. So edit the flake.nix and start replacing the code from line 46.
To enter the development environment, use the following command:
nix develop
This command opens a new shell where all the dependencies for the project are available. You can use this shell to test and debug your changes to the blinkstick-scripts
package.