Add Nix env
This commit is contained in:
parent
ac533001c5
commit
055d5ea784
|
@ -16,6 +16,9 @@ nix flake init --template github:the-nix-way/dev-templates#go_1_18
|
|||
# Java
|
||||
nix flake init --template github:the-nix-way/dev-templates#java
|
||||
|
||||
# Nix
|
||||
nix flake init --template github:the-nix-way/dev-templates#nix
|
||||
|
||||
# Node.js
|
||||
nix flake init --template github:the-nix-way/dev-templates#node
|
||||
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1659041591,
|
||||
"narHash": "sha256-kKoy3tDZl3w0GuVlvJ6W/ERGRqeXy2+IGXL9g1a3F68=",
|
||||
"lastModified": 1659045899,
|
||||
"narHash": "sha256-/vNGtQG19phpMfvkgNtOvSNkG2+na56wMlP/JEOaIjc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ab0794b1ae2756411d176dd5b82843a4ae56fe6e",
|
||||
"rev": "a9fb3ea0e746226a8bed539854f44ba87df03909",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1659041591,
|
||||
"narHash": "sha256-kKoy3tDZl3w0GuVlvJ6W/ERGRqeXy2+IGXL9g1a3F68=",
|
||||
"lastModified": 1659045899,
|
||||
"narHash": "sha256-/vNGtQG19phpMfvkgNtOvSNkG2+na56wMlP/JEOaIjc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ab0794b1ae2756411d176dd5b82843a4ae56fe6e",
|
||||
"rev": "a9fb3ea0e746226a8bed539854f44ba87df03909",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1659041591,
|
||||
"narHash": "sha256-kKoy3tDZl3w0GuVlvJ6W/ERGRqeXy2+IGXL9g1a3F68=",
|
||||
"lastModified": 1659045899,
|
||||
"narHash": "sha256-/vNGtQG19phpMfvkgNtOvSNkG2+na56wMlP/JEOaIjc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ab0794b1ae2756411d176dd5b82843a4ae56fe6e",
|
||||
"rev": "a9fb3ea0e746226a8bed539854f44ba87df03909",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1659041591,
|
||||
"narHash": "sha256-kKoy3tDZl3w0GuVlvJ6W/ERGRqeXy2+IGXL9g1a3F68=",
|
||||
"lastModified": 1659045899,
|
||||
"narHash": "sha256-/vNGtQG19phpMfvkgNtOvSNkG2+na56wMlP/JEOaIjc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ab0794b1ae2756411d176dd5b82843a4ae56fe6e",
|
||||
"rev": "a9fb3ea0e746226a8bed539854f44ba87df03909",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
1
nix/.envrc
Normal file
1
nix/.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use flake .
|
42
nix/flake.lock
Normal file
42
nix/flake.lock
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1656928814,
|
||||
"narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1659045899,
|
||||
"narHash": "sha256-/vNGtQG19phpMfvkgNtOvSNkG2+na56wMlP/JEOaIjc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a9fb3ea0e746226a8bed539854f44ba87df03909",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
31
nix/flake.nix
Normal file
31
nix/flake.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
description = "A Nix-flake-based Zig development environment";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
||||
nix = pkgs.nixUnstable;
|
||||
|
||||
helpers = with pkgs; [ nixpkgs-fmt statix ];
|
||||
|
||||
inherit (pkgs) mkShell;
|
||||
in {
|
||||
devShells = {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = [ nix ] ++ helpers;
|
||||
|
||||
shellHook = ''
|
||||
${nix}/bin/nix --version
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
|
@ -17,11 +17,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1659041591,
|
||||
"narHash": "sha256-kKoy3tDZl3w0GuVlvJ6W/ERGRqeXy2+IGXL9g1a3F68=",
|
||||
"lastModified": 1659045899,
|
||||
"narHash": "sha256-/vNGtQG19phpMfvkgNtOvSNkG2+na56wMlP/JEOaIjc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ab0794b1ae2756411d176dd5b82843a4ae56fe6e",
|
||||
"rev": "a9fb3ea0e746226a8bed539854f44ba87df03909",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -32,11 +32,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1659041591,
|
||||
"narHash": "sha256-kKoy3tDZl3w0GuVlvJ6W/ERGRqeXy2+IGXL9g1a3F68=",
|
||||
"lastModified": 1659045899,
|
||||
"narHash": "sha256-/vNGtQG19phpMfvkgNtOvSNkG2+na56wMlP/JEOaIjc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ab0794b1ae2756411d176dd5b82843a4ae56fe6e",
|
||||
"rev": "a9fb3ea0e746226a8bed539854f44ba87df03909",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1659041591,
|
||||
"narHash": "sha256-kKoy3tDZl3w0GuVlvJ6W/ERGRqeXy2+IGXL9g1a3F68=",
|
||||
"lastModified": 1659045899,
|
||||
"narHash": "sha256-/vNGtQG19phpMfvkgNtOvSNkG2+na56wMlP/JEOaIjc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ab0794b1ae2756411d176dd5b82843a4ae56fe6e",
|
||||
"rev": "a9fb3ea0e746226a8bed539854f44ba87df03909",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1659041591,
|
||||
"narHash": "sha256-kKoy3tDZl3w0GuVlvJ6W/ERGRqeXy2+IGXL9g1a3F68=",
|
||||
"lastModified": 1659045899,
|
||||
"narHash": "sha256-/vNGtQG19phpMfvkgNtOvSNkG2+na56wMlP/JEOaIjc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ab0794b1ae2756411d176dd5b82843a4ae56fe6e",
|
||||
"rev": "a9fb3ea0e746226a8bed539854f44ba87df03909",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
Loading…
Reference in a new issue