A flake providing Open Wearables as a docker/podman-based service.
  • Nix 95%
  • Just 5%
Find a file
2026-07-16 14:48:01 -05:00
.config chore: initial commit 2026-07-16 14:48:01 -05:00
src/nix chore: initial commit 2026-07-16 14:48:01 -05:00
.editorconfig chore: initial commit 2026-07-16 14:48:01 -05:00
.envrc chore: initial commit 2026-07-16 14:48:01 -05:00
.gitignore chore: initial commit 2026-07-16 14:48:01 -05:00
.prettierignore chore: initial commit 2026-07-16 14:48:01 -05:00
flake.lock chore: initial commit 2026-07-16 14:48:01 -05:00
flake.nix chore: initial commit 2026-07-16 14:48:01 -05:00
Justfile chore: initial commit 2026-07-16 14:48:01 -05:00
README.md chore: initial commit 2026-07-16 14:48:01 -05:00

Open Wearables Flake

This is currently pinned to Open Wearables 0.6.3.

This flake provides a NixOS module for running Open Wearables. It pins the upstream GitHub source and builds the backend and frontend as OCI containers using Docker or Podman.

{
  inputs = {
    flake-parts.url = "github:hercules-ci/flake-parts";
    nixpkgs.url = "nixpkgs/nixos-25.11";

    open-wearables.url = "https://src.mfgames.com/nixos-contrib/open-wearables-flake";

    sops-nix.url = "github:Mic92/sops-nix";
    sops-nix.inputs.nixpkgs.follows = "nixpkgs";
  };

  outputs =
    inputs@{ flake-parts, ... }:
    flake-parts.lib.mkFlake { inherit inputs; } {
      systems = [ "x86_64-linux" ];

      flake.nixosConfigurations.example = inputs.nixpkgs.lib.nixosSystem {
        system = "x86_64-linux";
        modules = [
          inputs.open-wearables.nixosModules.default
          inputs.sops-nix.nixosModules.sops

          (
            { config, ... }:
            {
              services.open-wearables = {
                enable = true;
                containerRuntime = "podman"; # or "docker"
                environmentFile = config.sops.secrets.open-wearables-backend.path;
                backendUrl = "https://api.wearables.example.com";
              };

              sops.secrets.open-wearables-backend = {
                sopsFile = ./secrets.yaml;
                mode = "0400";
              };
            }
          )
        ];
      };
    };
}

Create secrets.yaml with sops secrets.yaml and add the following:

  • SECRET_KEY
  • MASTER_KEY
  • DB_PASSWORD
  • ADMIN_EMAIL
  • ADMIN_PASSWORD.

Provider credentials and other application settings use the same names documented in Open Wearables' backend/config/.env.example. Add each value to secrets.yaml.

When enableSvix is enabled, also add:

  • SVIX_JWT_SECRET
  • OUTGOING_WEBHOOKS_ENABLED=true

The service persists PostgreSQL and Redis data beneath /var/lib/open-wearables by default. It exposes the frontend on port 3000, the API on port 8000, and Flower on port 5555. Put a reverse proxy in front of those ports for a public deployment.

Set containerRuntime to "docker" or "podman". It defaults to Docker for compatibility with existing configurations. The module enables the selected runtime and uses its corresponding Compose implementation.

With Podman, writable bind mounts use its U and Z volume options. Podman may change ownership of files below dataDir so the PostgreSQL and Redis container users can access their persistent data.