project: initialize the Nix environment

This commit is contained in:
Gabriel Arazas 2023-04-06 17:06:59 +08:00
parent 5cd801dca2
commit 91f5f61976
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
3 changed files with 70 additions and 0 deletions

43
flake.lock generated Normal file
View File

@ -0,0 +1,43 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1680776469,
"narHash": "sha256-3CXUDK/3q/kieWtdsYpDOBJw3Gw4Af6x+2EiSnIkNQw=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "411e8764155aa9354dbcd6d5faaeb97e9e3dce24",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1680728981,
"narHash": "sha256-ZhsViPJJvET7iLyD9ey63q6GwPKquDqIbOn2letvb/A=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "38263d02cf3a22e011e137b8f67cdf8419f28015",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

15
flake.nix Normal file
View File

@ -0,0 +1,15 @@
{
description = "Basic flake template for setting up development shells";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = inputs@{ self, nixpkgs, ... }:
let systems = inputs.flake-utils.lib.defaultSystems;
in inputs.flake-utils.lib.eachSystem systems (system: {
devShells.default =
import ./shell.nix { pkgs = import nixpkgs { inherit system; }; };
});
}

12
shell.nix Normal file
View File

@ -0,0 +1,12 @@
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
mkShell {
packages = [
asciidoctor
git
go
hugo
];
}