feat: add NixOS configuration with direnv support

- Add flake.nix with dev shell
- Add NixOS module for Azion runtime config
- Add direnv .envrc for auto-activation
- Update .gitignore with .p*, result, .worktrees/, docs/, .direnv/
This commit is contained in:
2026-04-30 07:38:01 +02:00
parent f22a25ce46
commit 8770e60c93
6 changed files with 631 additions and 0 deletions

71
flake.nix Normal file
View File

@@ -0,0 +1,71 @@
{
description = "AZion Scheduler - React SPA for scheduling tasks";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
};
outputs = {
self,
nixpkgs,
}: let
systems = [
"aarch64-linux"
"x86_64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
in {
nixosModules.default = import ./nixos;
devShells = forAllSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
default = pkgs.mkShell {
name = "azion-scheduler-dev";
buildInputs = with pkgs; [
nodejs_22
nodePackages.typescript
];
shellHook = ''
echo "AZion Scheduler Development Environment"
echo ""
echo "Available commands:"
echo " npm run dev - Start development server"
echo " npm run build - Build for production"
echo " npm run preview - Preview production build"
echo ""
echo "Node version: $(node --version)"
echo "NPM version: $(npm --version)"
echo "=========================================="
'';
};
});
packages = forAllSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
default = pkgs.buildNpmPackage {
pname = "azion-scheduler";
version = "2.0.0";
src = self;
npmDepsHash = "sha256-/4YWme2q0MSQkhdAfDJwNP/qxCBtNC/FNTi41Uejdy0=";
installPhase = ''
runHook preInstall
cp -r dist $out
runHook postInstall
'';
meta = with pkgs.lib; {
description = "AZion Scheduler web UI";
platforms = platforms.linux;
};
};
});
};
}