Thymis Documentation

Packaging software

In Thymis, you’ll need to package your applications or dependencies for deployment on your devices. Thymis leverages Nix for reproducible builds and dependency management, making it easier to deploy consistent software across your device fleet.

Packaging approaches

Using existing packages

Start by checking if your software is already available in Nixpkgs. If it is, you can simply reference it in your module configurations without any additional packaging work.

Custom packaging

When your software isn’t available or requires customizations, you’ll need to create a Nix expression for it. This ranges from simple use of the Custom Module to writing full-fledged derivations.

Next steps

  1. Set up Nix locally for development and testing
  2. Learn Nix basics with our Nix 101 guide
  3. Check language-specific guides:

Creating a module

Once packaged, wrap your software in a Thymis Module to make it configurable through the Thymis UI:

class MyAppModule(Module):
    display_name = "My Application"

    # Add settings here
    api_key = Setting(type="string", ...)

    def write_nix_settings(self, f, path, settings, priority, project):
        # Include your package and configure it
        f.write("environment.systemPackages = [inputs.my-app];")

External resources

For advanced packaging scenarios:

Deployment

After creating and testing your package:

  1. Add your module to a device configuration or tag
  2. Commit your changes
  3. Build and deploy to your devices

See Deploy an Update for detailed deployment instructions.

ende