65 lines
1.4 KiB
Nix
65 lines
1.4 KiB
Nix
{
|
|
sources ? import ./nix,
|
|
pkgs ? import sources.nixpkgs { },
|
|
pre-commit ? import ./nix/pre-commit.nix,
|
|
}:
|
|
let
|
|
dotnet-sdk = pkgs.dotnetCorePackages.sdk_9_0;
|
|
agenix = pkgs.callPackage "${sources.agenix}/pkgs/agenix.nix" { };
|
|
in
|
|
pkgs.mkShellNoCC {
|
|
buildInputs = [ dotnet-sdk ];
|
|
|
|
packages = with pkgs; [
|
|
# F#
|
|
fable
|
|
dotnet-outdated
|
|
fantomas
|
|
fsautocomplete
|
|
|
|
# JavaScript
|
|
bun
|
|
nodejs
|
|
|
|
# Devlopment tools
|
|
npins
|
|
mkcert
|
|
dive
|
|
nix-output-monitor
|
|
just
|
|
|
|
# Secret management with agenix
|
|
agenix
|
|
|
|
# Kubernetes tools
|
|
tilt
|
|
dapr-cli
|
|
kustomize
|
|
kubernetes-helm
|
|
];
|
|
|
|
# Environment variables
|
|
DOTNET_ROOT = "${dotnet-sdk}/share/dotnet";
|
|
DOTNET_CLI_TELEMETRY_OPTOUT = "true";
|
|
LOG_LEVEL = "verbose";
|
|
|
|
# Alternative shells
|
|
passthru = pkgs.lib.mapAttrs (name: value: pkgs.mkShellNoCC (value // { inherit name; })) {
|
|
pre-commit.shellHook = pre-commit.shellHook;
|
|
agenix-gen = {
|
|
packages = [ agenix ];
|
|
shellHook = ''
|
|
if [ -z "$NETRC" ] && [ -e ~/.ssh/id_ed25519 ]; then
|
|
pushd ./nix/secrets
|
|
export NETRC=$(agenix -d netrc.age -i ~/.ssh/id_ed25519)
|
|
popd
|
|
elif [ -z "$NETRC" ] && [ -e ~/.ssh/rsa ]; then
|
|
pushd ./nix/secrets
|
|
export NETRC=$(agenix -d netrc.age -i ~/.ssh/id_rsa)
|
|
popd
|
|
fi
|
|
'';
|
|
};
|
|
};
|
|
}
|