Files
api/flake.nix
Pujit Mehrotra 7aa55883e2 add nix flake for development (#1233)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Refined repository settings to auto-exclude environment and
build-related files.
- Introduced a new configuration that streamlines local development and
displays key tool versions on setup.
- **Documentation**
- Expanded contribution guidelines with a dedicated developer resources
section linking to guides on development practices and repository
structure.
- Updated workflow instructions to better assist developers in setting
up their environment, especially for those using Nix.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-03-18 11:15:57 -04:00

47 lines
1.3 KiB
Nix
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
description = "Unraid Connect Monorepo Development Environment";
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};
in
{
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
# Node.js and pnpm
nodejs_22
nodePackages.pnpm
# Development tools
just
git
# libvirt (for development)
libvirt
# Docker (for development)
docker
];
shellHook = ''
echo "🚀 Unraid API Development Environment"
echo ""
echo " BASH version: $BASH_VERSION"
echo " Node.js version: $(node --version)"
echo " pnpm version: $(pnpm --version)"
echo " just version: $(just --version)"
echo " git version: $(git --version)"
echo " docker version: $(docker --version)"
echo " libvirt version: $(virsh --version)"
echo ""
'';
};
}
);
}