From 8f5d74a6da4eb6bb45f4143e6ced8b8799fc9f74 Mon Sep 17 00:00:00 2001 From: Rowan Torbitzky-Lane Date: Tue, 18 Mar 2025 00:43:44 -0500 Subject: [PATCH] flake init --- flake.nix | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..a788ddd --- /dev/null +++ b/flake.nix @@ -0,0 +1,37 @@ +{ + description = "A flake for developing in a clojure environment with vscode"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; + }; + + outputs = { nixpkgs, ... }: + let system = "x86_64-linux"; in + { + devShells."${system}".default = + let + pkgs = nixpkgs.legacyPackages."${system}"; + in + pkgs.mkShellNoCC { + buildInputs = [ pkgs.bashInteractive ]; + packages = with pkgs; [ + rustc + cargo + gcc + rustfmt + clippy + (vscode-with-extensions.override { + vscode = vscodium; + vscodeExtensions = [ + rust-lang.rust-analyzer + ]; + }) + ]; + shellHook = '' + export SHELL=${pkgs.lib.getExe pkgs.bashInteractive} + echo "starting codium" + codium . + ''; + }; + }; +}