chore(nix): Add nix dev env

This commit is contained in:
Emil Ivanichkov 2024-01-01 13:40:51 +02:00 committed by Zahary Karadjov
parent 9db4e35425
commit 8ff6bdc0f1
No known key found for this signature in database
GPG Key ID: C1F42EAFF38D570F
4 changed files with 98 additions and 0 deletions

8
.envrc Normal file
View File

@ -0,0 +1,8 @@
# shellcheck shell=bash
if ! has nix_direnv_version || ! nix_direnv_version 2.4.0; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.4.0/direnvrc" "sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U="
fi
dotenv_if_exists
use flake

4
.gitignore vendored
View File

@ -37,3 +37,7 @@ dist-ssr
# vercel
/.vercel
.vercel
# Nix & Direnv
.direnv
result

62
flake.lock generated Normal file
View File

@ -0,0 +1,62 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1698882062,
"narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=",
"path": "/nix/store/vf5ra8smwlqy3pi0300s580g5msc3xp7-source",
"rev": "8c9fa2545007b49a5db5f650ae91f227672c3877",
"type": "path"
},
"original": {
"id": "flake-parts",
"type": "indirect"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1702921762,
"narHash": "sha256-O/rP7gulApQAB47u6szEd8Pn8Biw0d84j5iuP2tcxzY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d02ffbbe834b5599fc5f134e644e49397eb07188",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1698611440,
"narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

24
flake.nix Normal file
View File

@ -0,0 +1,24 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
};
outputs = inputs @ {
nixpkgs,
flake-parts,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux"];
perSystem = {pkgs, ...}: {
devShells.default = with pkgs;
mkShell {
packages = [
nodejs
yarn-berry
python3
];
};
};
};
}