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
- Set up Nix locally for development and testing
- Learn Nix basics with our Nix 101 guide
- 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:
- Nix.dev tutorials - Comprehensive Nix packaging guides
- NixOS Wiki - Community knowledge base
- Nixpkgs manual - Official packaging documentation
Deployment
After creating and testing your package:
- Add your module to a device configuration or tag
- Commit your changes
- Build and deploy to your devices
See Deploy an Update for detailed deployment instructions.