{ description = "A basic flake with a shell"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; inputs.flake-utils.url = "github:numtide/flake-utils"; inputs.nixos-generators = { url = "github:nix-community/nixos-generators"; inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { self, nixpkgs, flake-utils, nixos-generators }: flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; in { devShells.default = pkgs.mkShell { shellHook = '' bw sync export BW_SESSION=$(bw unlock --raw) export VERCEL_API_TOKEN=$(bw list items --search "Vercel API" | jq -r '.[0].notes') export HCLOUD_TOKEN=$(bw list items --search "Hetzner" | jq -r '.[0].fields[] | select(.name | contains("API")) | .value') export TF_VAR_tailscale_key=$(bw list items --search "Tailscale Key" | jq -r '.[0].notes') # alias terraform='terraform -chdir=terraform' ''; nativeBuildInputs = [ pkgs.jq pkgs.terraform pkgs.ansible pkgs.kubectl pkgs.awscli2 pkgs.nodePackages.yaml-language-server pkgs.python39Packages.python-lsp-server pkgs.k9s pkgs.flyctl pkgs.terraform-ls pkgs.cilium-cli ]; buildInputs = [ ]; }; packages.aarch64-linux = { k3s-server = nixos-generators.nixosGenerate { system = "aarch64-linux"; modules = [ ./pi-imgs/k3s-server.nix ]; format = "sd-aarch64-installer"; }; }; }); }