diff --git a/shells/rust/flake.lock b/shells/rust/flake.lock new file mode 100644 index 0000000..5017cd5 --- /dev/null +++ b/shells/rust/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1768305791, + "narHash": "sha256-AIdl6WAn9aymeaH/NvBj0H9qM+XuAuYbGMZaP0zcXAQ=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "1412caf7bf9e660f2f962917c14b1ea1c3bc695e", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/shells/rust/flake.nix b/shells/rust/flake.nix new file mode 100644 index 0000000..59ac689 --- /dev/null +++ b/shells/rust/flake.nix @@ -0,0 +1,24 @@ +{ + description = "Rust nix-flake devshell."; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + }; + + outputs = + { self, nixpkgs, ... }: + let + system = "x86_64-linux"; + in + { + devShells."${system}".default = + let + pkgs = import nixpkgs { inherit system; }; + in + pkgs.mkShell { + packages = with pkgs; [ + cargo + rust-analyzer + ]; + }; + }; +}