2026-05-09 19:55:48 +02:00
|
|
|
{
|
|
|
|
|
description = "CentralCloud unified portal (Elixir/Phoenix umbrella)";
|
|
|
|
|
|
|
|
|
|
inputs = {
|
2026-05-10 23:16:14 +02:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
2026-05-09 19:55:48 +02:00
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
|
};
|
|
|
|
|
|
2026-05-10 23:16:14 +02:00
|
|
|
nixConfig = {
|
|
|
|
|
extra-substituters = [
|
|
|
|
|
"https://cache.centralcloud.com/default"
|
|
|
|
|
];
|
|
|
|
|
extra-trusted-public-keys = [
|
|
|
|
|
"default:ywfU21WX06iOn2Ec2lae1jYh4w8LO4IQkmp06vJzsk8="
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
2026-05-09 19:55:48 +02:00
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
|
let
|
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
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
|
|
|
|
2026-05-11 11:23:14 +02:00
|
|
|
# Erlang OTP 28 without wxwidgets (avoids gstreamer→hotdoc→clang chain)
|
|
|
|
|
erlang_28_headless = pkgs.beamPackages.erlang.override {
|
|
|
|
|
wxGTK32 = null;
|
|
|
|
|
libGL = null;
|
|
|
|
|
libGLU = null;
|
|
|
|
|
wrapGAppsHook3 = pkgs.buildEnv { name = "empty"; paths = []; };
|
|
|
|
|
xorg = { libX11 = null; };
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Elixir 1.20.0-rc.4 — not yet in nixpkgs; override elixir_1_19 against headless OTP 28
|
|
|
|
|
elixir_1_20_rc4 = (pkgs.beamPackages.elixir_1_19.override {
|
|
|
|
|
erlang = erlang_28_headless;
|
|
|
|
|
}).overrideAttrs (_old: {
|
|
|
|
|
version = "1.20.0-rc.4";
|
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
|
owner = "elixir-lang";
|
|
|
|
|
repo = "elixir";
|
|
|
|
|
rev = "v1.20.0-rc.4";
|
|
|
|
|
hash = "sha256-sboB+GW3T+t9gEcOGtd6NllmIlyWio1+cgWyyxE+484=";
|
|
|
|
|
};
|
|
|
|
|
});
|
2026-05-09 19:55:48 +02:00
|
|
|
in {
|
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
|
buildInputs = with pkgs; [
|
2026-05-11 11:23:14 +02:00
|
|
|
elixir_1_20_rc4 # 1.20.0-rc.4 built from source against OTP 28
|
|
|
|
|
erlang_28_headless # OTP 28.5, no wx/gui (headless server use)
|
|
|
|
|
nodejs_22 # Phoenix asset pipeline
|
|
|
|
|
inotify-tools # LiveReload on Linux
|
2026-05-09 19:55:48 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
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)"
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
}
|