diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..b96d5cb --- /dev/null +++ b/shell.nix @@ -0,0 +1,29 @@ +let + nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05"; + pkgs = import nixpkgs { config = { }; overlays = [ ]; }; +in + +pkgs.mkShellNoCC { + packages = with pkgs; [ + cowsay + lolcat + bitwarden + bitwarden-cli + sops + ]; + + GREETING = "Hello, Nix!"; + + shellHook = '' + echo $GREETING | cowsay | lolcat + bw config server https://vault.subsonics.nl + echo "please enter bitwarden email" + read BW_USER + echo "please enter bitwarden password" + read -s BW_PASSWORD + bw login $BW_USER $BW_PASSWORD + BW_SESSION="$(bw unlock $BW_PASSWORD --raw)" + mkdir -p ~/.config/sops/age + bw get attachment keys.txt --itemid ee6a90b0-4120-46f7-a1c6-9648316e43d5 --output ~/.config/sops/age/keys.txt + ''; +}