- Implement `Systant.HaDiscovery` module for automatic device registration - Add comprehensive sensor discovery: CPU, memory, GPU, disk, network, temperature - Update MQTT client to publish discovery messages on startup - Add HomeAssistant configuration section to systant.toml - Create example configuration file with localhost MQTT broker - Update CLAUDE.md with complete HA integration documentation - Add mosquitto to development dependencies for testing 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
88 lines
2.1 KiB
Nix
88 lines
2.1 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
|
|
elixir-ls
|
|
erlang
|
|
|
|
# File watching for Phoenix live reload
|
|
inotifyTools
|
|
|
|
# Process management and task running
|
|
hivemind
|
|
just
|
|
|
|
# AI/Development tools
|
|
claude-code
|
|
aider-chat
|
|
|
|
# Node.js for Phoenix assets
|
|
nodejs_20
|
|
nodePackages.npm
|
|
|
|
# Database for development
|
|
postgresql
|
|
|
|
# Mosquito for MQTT support
|
|
mosquitto
|
|
];
|
|
|
|
shellHook = ''
|
|
echo "Systant development environment loaded"
|
|
echo "Elixir: $(elixir --version | tail -1)"
|
|
echo "Node.js: $(node --version)"
|
|
echo ""
|
|
echo "Directories:"
|
|
echo " server/ - Elixir systant daemon"
|
|
echo " dashboard/ - Phoenix LiveView dashboard"
|
|
echo ""
|
|
echo "Commands:"
|
|
echo " cd server && mix run --no-halt - Run systant daemon"
|
|
echo " cd dashboard && mix phx.server - Run Phoenix dashboard"
|
|
'';
|
|
};
|
|
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 start";
|
|
};
|
|
};
|
|
}
|
|
)
|
|
// {
|
|
nixosModules.default = import ./nix/nixos-module.nix;
|
|
};
|
|
}
|