portal/flake.nix
Mikael Hugo 453a6deead feat: Elixir 1.20-rc4/OTP28, wire Phoenix endpoints, router, LiveViews, auth plug
- flake.nix: Elixir 1.20.0-rc.4 via pkgs.path (reproducible, no hardcoded store paths)
- RequireAuth plug (session-based, redirects to /login)
- SessionController: login form, logout, OIDC callback stub
- DashboardLive, ReplicationLive, BillingLive, SupportLive (skeleton)
- Layouts: dark UI, nav, flash messages
- All compile clean on 1.20-rc4 with zero warnings

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-09 20:20:19 +02:00

37 lines
1.3 KiB
Nix

{
description = "CentralCloud unified portal (Elixir/Phoenix umbrella)";
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 = nixpkgs.legacyPackages.${system};
# Elixir 1.20-rc.4 — definition exists in nixpkgs but not yet exposed as elixir_1_20
elixir_1_20_rc4 = pkgs.callPackage
"${pkgs.path}/pkgs/development/interpreters/elixir/1.20.nix"
{ erlang = pkgs.erlang_28; };
in {
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
elixir_1_20_rc4 # 1.20.0-rc.4 — full type inference, built from source
erlang_28 # OTP 28.5
gleam # ready when we want type-safe core modules
nodejs_22 # for Phoenix asset pipeline
inotify-tools # LiveReload on Linux
];
shellHook = ''
export MIX_HOME=$HOME/.mix
export HEX_HOME=$HOME/.hex
export PATH=$MIX_HOME/bin:$HEX_HOME/bin:$PATH
echo "Elixir $(elixir --version | head -1)"
echo "Mix $(mix --version)"
'';
};
});
}