- Remove home-assistant-integration/ and dev-config/ - Remove Python/HA dependencies from flake.nix - Add Phoenix LiveView dashboard with clean Elixir-only stack - Add Node.js and PostgreSQL for Phoenix development - Much cleaner monorepo architecture focusing on Elixir ecosystem Next: Connect dashboard to MQTT for real-time host monitoring
76 lines
1.9 KiB
Nix
76 lines
1.9 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 for Phoenix assets
|
|
nodejs_20
|
|
npm
|
|
|
|
# Database for development
|
|
postgresql
|
|
];
|
|
|
|
shellHook = ''
|
|
echo "Systant development environment loaded"
|
|
echo "Elixir: $(elixir --version | head -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";
|
|
};
|
|
};
|
|
}
|
|
) // {
|
|
nixosModules.default = import ./nix/nixos-module.nix;
|
|
};
|
|
}
|