nix: add flake

This commit is contained in:
Bruno BELANYI 2021-03-06 16:33:21 +00:00
parent bfb7aa2e41
commit ba0afdeff3
2 changed files with 68 additions and 0 deletions

43
flake.lock Normal file
View file

@ -0,0 +1,43 @@
{
"nodes": {
"futils": {
"locked": {
"lastModified": 1614513358,
"narHash": "sha256-LakhOx3S1dRjnh0b5Dg3mbZyH0ToC9I8Y2wKSkBaTzU=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5466c5bbece17adaab2d82fae80b46e807611bf3",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1614815769,
"narHash": "sha256-Rdy37Ioof5FlMlc+YC9PniSIJW/EsdImG+wZPP5VWvo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d496205cf22c3079461d868ea3198d42ded59287",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"futils": "futils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

25
flake.nix Normal file
View file

@ -0,0 +1,25 @@
{
description = "Ambroisie's random scripts";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
futils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, futils } @ inputs:
futils.lib.eachSystem futils.lib.allSystems (system:
let
inherit (nixpkgs) lib;
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShell = pkgs.mkShell {
name = "scripts";
buildInputs = with pkgs; [
gitAndTools.pre-commit
shellcheck
];
};
}
);
}