nix: switch to shell.nix instead of flakes

This commit is contained in:
Agahnim 2026-05-11 15:42:47 +02:00
parent a1921bf27e
commit 08dce236cf
Signed by: Agahnim
SSH key fingerprint: SHA256:Zj65PJnE0dRYye8Ltk/qDglynyXUxJngQ9qqx/VI+b4
4 changed files with 18 additions and 59 deletions

2
.envrc
View file

@ -1 +1 @@
use flake
use nix

27
flake.lock generated
View file

@ -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
}

View file

@ -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"
'';
};
};
}

17
shell.nix Normal file
View file

@ -0,0 +1,17 @@
{pkgs ? import <nixpkgs> {}}:
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"
'';
}