diff --git a/.envrc b/.envrc index ae3119a..3550a30 100644 --- a/.envrc +++ b/.envrc @@ -1,2 +1 @@ -use_nix -unset PS1 +use flake diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..44123a9 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1681091990, + "narHash": "sha256-ifIzhksUBZKp5WgCuoVhDY32qaEplXp7khzrB6zkaFc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ea96b4af6148114421fda90df33cf236ff5ecf1d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-22.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "utils": "utils" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1681037374, + "narHash": "sha256-XL6X3VGbEFJZDUouv2xpKg2Aljzu/etPLv5e1FPt1q0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "033b9f258ca96a10e543d4442071f614dc3f8412", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..4fec04b --- /dev/null +++ b/flake.nix @@ -0,0 +1,33 @@ +{ + description = "A Nix flake for my long-running seal blog"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; + utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, utils }: + utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + + ghc' = pkgs.haskellPackages.ghcWithHoogle (self: with self; [ + hakyll + neat-interpolation + parallel + random + split + ]); + in + { + devShells.default = pkgs.mkShell { + name = "hakyll-shell"; + + buildInputs = with pkgs.haskellPackages; + [ + ghc' + hlint + ]; + }; + }); +}