diff --git a/.envrc b/.envrc index 3550a30..1d953f4 100644 --- a/.envrc +++ b/.envrc @@ -1 +1 @@ -use flake +use nix diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 167663e..0000000 --- a/flake.lock +++ /dev/null @@ -1,27 +0,0 @@ -{ - "nodes": { - "nixpkgs": { - "locked": { - "lastModified": 1773821835, - "narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index eb18119..0000000 --- a/flake.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - description = "Rust dev flake"; - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - }; - outputs = { - self, - nixpkgs, - }: let - system = "x86_64-linux"; - pkgs = import nixpkgs {inherit system;}; - in { - devShells."x86_64-linux".default = pkgs.mkShell { - nativeBuildInputs = with pkgs; [ - ]; - buildInputs = with pkgs; [ - rustc - rust-analyzer - rustfmt - clippy - cargo - cargo-watch - ]; - shellHook = '' - echo "=========================================================" - echo "Pour lancer le projet et avoir les changements en temps réel : " - echo "- cargo watch -w content -w src -w templates -w static -x run" - ''; - }; - }; -} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..122c15c --- /dev/null +++ b/shell.nix @@ -0,0 +1,17 @@ +{pkgs ? import {}}: +pkgs.mkShell { + packages = with pkgs; [ + rustc + rust-analyzer + rustfmt + clippy + cargo + cargo-watch + ]; + + shellHook = '' + echo "=========================================================" + echo "Pour lancer le projet et avoir les changements en temps réel : " + echo "- cargo watch -w content -w src -w templates -w static -x run" + ''; +}