summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authoranand <anand.panchdhari@gmail.com>2026-04-06 22:33:59 +0530
committeranand <anand.panchdhari@gmail.com>2026-04-06 22:33:59 +0530
commit7e6d5f007c72ad60b1a797e842a1154f58634e11 (patch)
tree2d8783872c7062cff033d57aa8f28ae48acc6f38 /flake.nix
parentbfc73d250acfa1bb692e9cfe244a00f183915634 (diff)
loopsmain
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..0d94ad0
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,34 @@
+{
+ description = "Rust development";
+
+ inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
+ };
+
+ outputs =
+ { self, nixpkgs }:
+ let
+ pkgs = nixpkgs.legacyPackages.x86_64-linux;
+ in
+ {
+ devShells.x86_64-linux.default = pkgs.mkShell {
+ packages = with pkgs; [
+ gcc
+ bashInteractive
+ rustc
+ clippy
+ cargo
+ rustfmt
+ rust-analyzer
+ ];
+
+ shellHook = ''
+ export SHELL=${pkgs.bashInteractive}/bin/bash
+ export NIX_SHELL_NAME="Rust development"
+ if [[ -n "$PS1" ]]; then
+ PS1="\[\e[38;5;45m\][nix:$NIX_SHELL_NAME]\[\e[0m\] $PS1"
+ fi
+ '';
+ };
+ };
+}