41 lines
1.3 KiB
Nix
41 lines
1.3 KiB
Nix
{ pkgs ? import <nixpkgs> {} }:
|
|
|
|
pkgs.mkShell {
|
|
# Define the packages you want in your environment
|
|
packages = with pkgs; [
|
|
fluxcd
|
|
talosctl
|
|
kubectl
|
|
zsh # Include zsh itself in the shell environment
|
|
];
|
|
|
|
# Optional: Set environment variables or run commands when entering the shell
|
|
shellHook = ''
|
|
echo "Welcome to your FluxCD, Talosctl, and Kubectl development environment with Zsh!"
|
|
echo "The following tools are available:"
|
|
echo " - flux"
|
|
echo " - talosctl"
|
|
echo " - kubectl"
|
|
|
|
export TALOSCONFIG="$(pwd)/testing1/.talosconfig"
|
|
export KUBECONFIG="$(pwd)/testing1/kubeconfig"
|
|
|
|
export NIX_PROJECT_SHELL="kubernetes-management"
|
|
# Source your Home Manager generated Zsh configuration
|
|
# This assumes your home-manager configuration is applied to your user.
|
|
# The exact path might vary slightly based on your home-manager setup.
|
|
if [ -f "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" ]; then
|
|
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
|
fi
|
|
if [ -f "$HOME/.nix-profile/etc/profile.d/hm-config-loader.sh" ]; then
|
|
. "$HOME/.nix-profile/etc/profile.d/hm-config-loader.sh"
|
|
fi
|
|
if [ -f "$HOME/.nix-profile/etc/profile.d/hm-zsh.sh" ]; then
|
|
. "$HOME/.nix-profile/etc/profile.d/hm-zsh.sh"
|
|
fi
|
|
|
|
# Start Zsh within the nix-shell
|
|
exec zsh
|
|
'';
|
|
}
|