systant/flake.nix
ryan c7949285d1 Add Home Assistant custom integration for Systant
- Create basic integration structure with manifest.json
- Add config flow for easy setup via UI
- Implement MQTT-based host discovery and sensor creation
- Auto-discover Systant hosts via systant/+/stats topic
- Create device entities with last_seen sensor for each host
- Add Python tooling to flake.nix for HA development

Integration features:
- Automatic host discovery via MQTT
- Device representation for each monitored host
- Extensible sensor architecture
- Proper Home Assistant integration patterns
2025-08-02 20:19:57 -07:00

83 lines
2.2 KiB
Nix

{
description = "Elixir system monitor daemon";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
system = system;
config.allowUnfree = true;
};
in
{
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
# Elixir/Erlang for server
elixir
erlang
# AI/Development tools
claude-code
aider-chat
# Node.js tools
nodejs_20
yarn
deno
# Python for Home Assistant integration
python311
python311Packages.pip
python311Packages.ipython
python311Packages.pytest
python311Packages.homeassistant
python311Packages.pytest-homeassistant-custom-component
python311Packages.black
python311Packages.isort
python311Packages.flake8
python311Packages.mypy
];
shellHook = ''
echo "Systant development environment loaded"
echo "Elixir: $(elixir --version | head -1)"
echo "Python: $(python --version)"
echo "Available tools: pytest, black, isort, flake8, mypy"
echo ""
echo "Directories:"
echo " server/ - Elixir systant daemon"
echo " home-assistant-integration/ - Home Assistant custom integration"
'';
};
packages = {
default = pkgs.callPackage ./nix/package.nix {
src = ./server;
};
systant = pkgs.callPackage ./nix/package.nix {
src = ./server;
};
};
apps = {
default = {
type = "app";
program = "${self.packages.${system}.default}/bin/systant";
};
};
}
) // {
nixosModules.default = import ./nix/nixos-module.nix;
};
}