A standalone NixOS flake providing native Nix packages and modules for OpenVoiceOS - the open-source voice assistant platform.
- 🎯 Native Nix packages - No Docker, pure Nix derivations for all components
- ⚙️ Declarative configuration - Configure your voice assistant entirely in Nix
- 🔊 TTS/STT support - Integrated Piper TTS and Faster-Whisper STT with model registry
- 🧩 Skills framework - Easy packaging and deployment of OVOS skills
- 🔒 Security hardened - Systemd service hardening and proper user isolation
- 📦 Model management - Declarative model fetching from Hugging Face
Add this flake to your configuration:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
ovos.url = "github:tophcodes/ovos-flake";
};
outputs = { nixpkgs, home-manager, ovos, ... }: {
nixosConfigurations.yourhost = nixpkgs.lib.nixosSystem {
modules = [
ovos.nixosModules.default
home-manager.nixosModules.home-manager
{
home-manager.users.youruser = {
imports = [ ovos.homeManagerModules.default ];
};
}
./configuration.nix
];
};
};
}NixOS (message bus):
{
services.ovos = {
enable = true; # Starts messagebus on port 8181
};
}Home Manager (TTS/STT services):
{
services.ovos.audio = {
enable = true; # TTS with Piper
};
}Configure TTS voice in NixOS, use in home-manager:
# NixOS
services.ovos.speech.voice = "en_US-amy-low"; # Faster voice
# Home Manager - audio service reads this from system config
services.ovos.audio.enable = true;| Option | Type | Default | Description |
|---|---|---|---|
enable |
bool | false |
Enable OVOS messagebus |
host |
string | "0.0.0.0" |
Host to bind messagebus to |
port |
port | 8181 |
Messagebus WebSocket port |
speech.backend |
string | "piper" |
TTS backend |
speech.voice |
string | "en_US-lessac-medium" |
Piper voice |
location.timezone |
string | "America/Chicago" |
Timezone |
| Option | Type | Default | Description |
|---|---|---|---|
audio.enable |
bool | false |
Enable TTS audio service |
audio.logLevel |
enum | "INFO" |
Log level |
messagebusHost |
string | "127.0.0.1" |
Messagebus host |
messagebusPort |
port | 8181 |
Messagebus port |
All packages are available in the packages.<system> flake output:
ovos-messagebus- Core message bus serviceovos-bus-client- Message bus client libraryovos-config- Configuration managementovos-utils- Utility libraryovos-plugin-manager- Plugin loading systemovos-workshop- Skill framework base classesovos-core- Skills engine and intent serviceovos-audio- Audio output service
ovos-skill-date-time- Date, time, and day of week skill
Build a package directly:
nix build github:tophcodes/ovos-flake#ovos-messagebusUse in your own derivations:
{ pkgs }:
pkgs.mkShell {
buildInputs = [
pkgs.ovosPackages.ovos-core
];
}The flake includes a declarative model registry for TTS and STT models at lib.models.
Pre-configured voices fetched from Hugging Face:
| Voice | Quality | Description |
|---|---|---|
en_US-lessac-medium |
Medium | High-quality American English voice |
en_US-amy-low |
Low | Fast American English voice |
Supported Faster-Whisper models:
| Model | Parameters | Speed | Languages |
|---|---|---|---|
tiny / tiny.en |
~39M | Fastest | Multilingual / English-only |
base / base.en |
~74M | Fast | Multilingual / English-only |
small / small.en |
~244M | Moderate | Multilingual / English-only |
medium / medium.en |
~769M | Slow | Multilingual / English-only |
large-v2 / large-v3 |
~1550M | Slowest | Multilingual |
Models ending in .en are English-only and slightly faster.
# In your flake
let
models = inputs.ovos.lib.models;
in {
# Access a specific voice
myVoice = models.piperVoices."en_US-lessac-medium";
# List all voices
allVoices = builtins.attrNames models.piperVoices;
}The flake provides a buildOvosSkill helper for packaging OVOS skills.
Create a file in pkgs/ovos-skills/myskill.nix:
{
fetchFromGitHub,
buildOvosSkill,
requests, # Additional dependencies
}:
buildOvosSkill rec {
pname = "ovos-skill-weather";
version = "1.0.0";
src = fetchFromGitHub {
owner = "OpenVoiceOS";
repo = "skill-weather";
rev = "v${version}";
hash = "sha256-...";
};
skillId = "weather.openvoiceos";
propagatedBuildInputs = [ requests ];
meta = {
description = "Weather skill for OpenVoiceOS";
homepage = "https://github.com/OpenVoiceOS/skill-weather";
};
}Add to pkgs/ovos-skills/default.nix:
{
# ... existing skills
weather = callPackage ./weather.nix {};
}The skill will be automatically exposed as ovos-skill-weather in the flake packages.
- Automatically includes
ovos-workshopdependency - Creates dummy requirements files (OVOS packages expect these)
- Installs skill data to
/nix/store/.../share/ovos/skills/ - Sets reasonable defaults for metadata
- Disables checks (skills typically don't have standalone tests)
NixOS:
{
services.ovos = {
enable = true;
host = "127.0.0.1"; # Local only
logLevel = "DEBUG";
};
}Home Manager:
{
services.ovos.audio = {
enable = true;
logLevel = "DEBUG";
};
}Apply the overlay to get OVOS packages in your pkgs:
{
nixpkgs.overlays = [
inputs.ovos.overlays.default
];
# Now available as pkgs.ovosPackages.*
environment.systemPackages = [
pkgs.ovosPackages.ovos-core
];
}System services:
systemctl status ovos-messagebus
journalctl -u ovos-messagebus -fUser services:
systemctl --user status ovos-audio
journalctl --user -u ovos-audio -f- System config:
/etc/mycroft/mycroft.conf - System state:
/var/lib/ovos/ - User config:
~/.config/mycroft/mycroft.conf
# Build all packages
nix build .#ovos-messagebus
nix build .#ovos-core
# Run checks
nix flake check
# Format code
nix fmt
# Enter dev shell
nix develop# Run VM integration test
nix build .#checks.x86_64-linux.basic- Create package file in
pkgs/ovos/mypackage.nix - Add to
pkgs/ovos/default.nixin the scope - Export in
flake.nixpackages output - Test build:
nix build .#mypackage
✅ Phase 1: Core Infrastructure - Complete ✅ Phase 2: Essential Plugins - Complete ✅ Phase 3: Voice Services - Complete ✅ Phase 4: Home Manager Module - Complete 🚧 Phase 5: STT/Listener - Planned
- ✅ NixOS module (messagebus)
- ✅ Home Manager module (audio service)
- ✅ Piper TTS plugin with voice registry
- ✅ Core packages and plugin system
- ✅ Skills framework (buildOvosSkill)
- ⏳ STT listener service (future)
- ⏳ Skills service (future)
┌─────────────────┐
│ NixOS Module │ Declarative configuration
└────────┬────────┘
│
┌────▼────┐
│ Message │ WebSocket server (port 8181)
│ Bus │ Core communication hub
└────┬────┘
│
┌────┼────┐
│ │ │
┌───▼┐ ┌─▼──┐ ┌▼────┐
│Core│ │Audio│ │Skills│ Services communicate via bus
│ │ │ │ │ │
└─┬──┘ └──┬──┘ └───┬──┘
│ │ │
│ ┌───▼────┐ │
│ │ TTS │ │ Piper voices (model registry)
│ │ Plugin │ │
│ └────────┘ │
│ │
└────────┬───────┘
│
┌────▼─────┐
│ Skills │ Extensible via buildOvosSkill
└──────────┘
Check logs:
journalctl -u ovos-messagebus -n 50Verify configuration:
cat /etc/ovos/mycroft.confChange the port in configuration:
services.ovos.port = 8182;Models are fetched at build time. If you get hash mismatches, the model may have been updated. Please file an issue.
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Follow the existing code style (use
nix fmt) - Add tests if applicable
- Submit a pull request
To add a new Piper voice:
- Get the model URL from Hugging Face
- Fetch with
nix-prefetch-url <url> - Convert hash:
nix hash convert --hash-algo sha256 --to sri <hash> - Add to
lib/models.nix
Apache-2.0
- OpenVoiceOS team for the excellent voice assistant platform
- Rhasspy project for Piper TTS
- SYSTRAN for Faster-Whisper
- NixOS community for the packaging ecosystem
Note: This project was built with the assistance of generative AI (Claude Code). While the code has been reviewed and tested, please report any issues you encounter.