From 140726a6ffca264610aaf41c6e99fa5f6d9e9add Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 28 May 2021 18:22:52 +0200 Subject: [PATCH] nix: add flake --- flake.lock | 44 ++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..d54ed09 --- /dev/null +++ b/flake.lock @@ -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 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..8cab0bb --- /dev/null +++ b/flake.nix @@ -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 + ]; + }; + } + ); +}