ansible/shell.nix
2026-08-05 19:19:58 +02:00

27 lines
565 B
Nix

let
pkgs = import <nixpkgs> {
overlays = [ ];
};
in
pkgs.mkShell {
buildInputs = with pkgs; [
bitwarden-cli
python3
python3Packages.uv
libmysqlclient
];
shellHook = ''
if [ ! -d .venv ]; then
uv venv .venv
fi
source .venv/bin/activate
source dev-helpers.sh
BITWARDENCLI_APPDATA_DIR="$HOME/.config/Bitwarden CLI Urmel"
if [ -f /tmp/urmel_ansible_bw_session ]; then
export BW_SESSION=$(cat /tmp/urmel_ansible_bw_session)
else
echo 'You need to unlock Bitwarden, run "unlock"'
fi
'';
}