migrate dev shell to nix flake

This commit is contained in:
2025-05-15 12:56:37 +02:00
parent 734d22f4ee
commit 153483f54f
4 changed files with 52 additions and 8 deletions

2
.envrc
View File

@@ -1 +1 @@
use nix
use flake

27
flake.lock generated Normal file
View File

@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1746904237,
"narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

24
flake.nix Normal file
View File

@@ -0,0 +1,24 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs =
{ nixpkgs, ... }:
{
devShells =
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
{
${system}.default = pkgs.mkShellNoCC {
packages = with pkgs; [
deno
pkgs.nil # Nix language server
pkgs.nixfmt-rfc-style
];
};
};
};
}

View File

@@ -1,7 +0,0 @@
{
pkgs ? import <nixpkgs> { },
}:
pkgs.mkShell {
packages = with pkgs; [ deno ];
}