nix: add flake

This commit is contained in:
Bruno BELANYI 2021-05-28 18:22:52 +02:00
parent df009217c9
commit 140726a6ff
2 changed files with 82 additions and 0 deletions

44
flake.lock Normal file
View file

@ -0,0 +1,44 @@
{
"nodes": {
"futils": {
"locked": {
"lastModified": 1622445595,
"narHash": "sha256-m+JRe6Wc5OZ/mKw2bB3+Tl0ZbtyxxxfnAWln8Q5qs+Y=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "7d706970d94bc5559077eb1a6600afddcd25a7c8",
"type": "github"
},
"original": {
"owner": "numtide",
"ref": "master",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1622282707,
"narHash": "sha256-+GOrUDsdneUqrOm9d+9bHXjEVoVcU8tm14WGVzbt6gg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6933d068c5d2fcff398e802f7c4e271bbdab6705",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"futils": "futils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

38
flake.nix Normal file
View file

@ -0,0 +1,38 @@
{
description = "Ambroisie's blog";
inputs = {
futils = {
type = "github";
owner = "numtide";
repo = "flake-utils";
ref = "master";
};
# https://nixpk.gs/pr-tracker.html?pr=124808
nixpkgs = {
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "nixos-unstable";
};
};
outputs = { self, futils, nixpkgs } @ inputs:
futils.lib.eachSystem futils.lib.allSystems (system:
let
inherit (nixpkgs) lib;
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShell = pkgs.mkShell {
name = "blog";
buildInputs = with pkgs; [
gnumake
hugo
];
};
}
);
}