From b0ec23c2c672380b169dfa51020c722d0746460d Mon Sep 17 00:00:00 2001 From: voidarc Date: Sun, 3 May 2026 17:37:16 +0100 Subject: [PATCH] added bun flake --- bun/flake.nix | 41 +++++++++++++++++++++++++++++++++++++++++ flake.nix | 4 ++++ 2 files changed, 45 insertions(+) create mode 100644 bun/flake.nix diff --git a/bun/flake.nix b/bun/flake.nix new file mode 100644 index 0000000..cb823fe --- /dev/null +++ b/bun/flake.nix @@ -0,0 +1,41 @@ +{ + description = "A simple Rust development environment"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + utils.url = "github:numtide/flake-utils"; + }; + + outputs = + { + self, + nixpkgs, + utils, + }: + utils.lib.eachDefaultSystem ( + system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + devShells.default = pkgs.mkShell { + + name = "flake-bunshell"; + + buildInputs = with pkgs; [ + bun + ]; + + # Environment variables + shellHook = '' + export DEVSHELL_NAME="󱄅 flake/#89dceb| Bun/yellow" + + # Trigger zsh + if [[ -z "$ZSH_VERSION" ]]; then + exec zsh + fi + ''; + }; + } + ); +} diff --git a/flake.nix b/flake.nix index f6f5d06..a685b32 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,10 @@ path = ./rust; description = "A standard Rust development environment"; }; + bun = { + path = ./bun; + description = "Flake for making a bun project"; + }; }; }; }