diff --git a/flake.lock b/flake.lock index 82917b9..2d614d3 100644 --- a/flake.lock +++ b/flake.lock @@ -1,27 +1,12 @@ { "nodes": { - "flake-utils": { - "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1665613119, - "narHash": "sha256-VTutbv5YKeBGWou6ladtgfx11h6et+Wlkdyh4jPJ3p0=", + "lastModified": 1667254466, + "narHash": "sha256-YrMQzDVOo+uz5gg1REj2q/uVhJE3WcpkqGiMzh3Da3o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e06bd4b64bbfda91d74f13cb5eca89485d47528f", + "rev": "1b4722674c315de0e191d0d79790b4eac51570a1", "type": "github" }, "original": { @@ -32,7 +17,6 @@ }, "root": { "inputs": { - "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index a43c72f..9dd8798 100644 --- a/flake.nix +++ b/flake.nix @@ -5,44 +5,53 @@ inputs = { nixpkgs.url = "nixpkgs/nixos-22.05"; - flake-utils.url = "github:numtide/flake-utils"; }; - outputs = { flake-utils, nixpkgs, self }: - flake-utils.lib.eachDefaultSystem (system: - let - config = {}; - overlays = [ (import ./nix/haskell-overlay.nix) ]; - pkgs = import nixpkgs { inherit config overlays system; }; - in rec { - defaultPackage = packages.website; - defaultApp = apps.hakyll-site; + outputs = { nixpkgs, self }: let + system = "x86_64-linux"; + overlays = [ (import ./nix/haskell-overlay.nix) ]; + pkgs = import nixpkgs { inherit overlays system; }; + in rec { + overlays = { + haskell-overlay = import ./nix/haskell-overlay.nix; + default = self.overlays.haskell-overlay; + }; - packages = with pkgs.myHaskellPackages; { inherit ssg website; }; + packages.${system} = with pkgs.myHaskellPackages; { + inherit ssg website; + default = website; + }; - apps.hakyll-site = let - drv = packages.ssg; - exePath = "/bin/hakyll-site"; - in { - type = "app"; - program = "${drv}${exePath}"; - }; + apps.${system} = { + hakyll-site = let + drv = packages.ssg; + exePath = "/bin/hakyll-site"; + in { + type = "app"; + program = "${drv}${exePath}"; + }; + default = self.apps.${system}.hakyll-site; + }; - devShell = pkgs.myHaskellPackages.shellFor { - packages = p: [ p.ssg ]; + devShells.${system}.default = pkgs.myHaskellPackages.shellFor { + packages = p: [ p.ssg ]; - buildInputs = with pkgs.myHaskellPackages; [ - # ssg + buildInputs = with pkgs.myHaskellPackages; [ + # ssg - # Helpful tools for `nix develop` shells - ghcid # https://github.com/ndmitchell/ghcid - haskell-language-server # https://github.com/haskell/haskell-language-server - hlint # https://github.com/ndmitchell/hlint - ormolu # https://github.com/tweag/ormolu - ]; + # Helpful tools for `nix develop` shells + ghcid # https://github.com/ndmitchell/ghcid + haskell-language-server # https://github.com/haskell/haskell-language-server + hlint # https://github.com/ndmitchell/hlint + ormolu # https://github.com/tweag/ormolu + ]; - withHoogle = true; - }; - } - ); + withHoogle = true; + }; + + hydraJobs = { + ssg.${system} = self.packages.${system}.ssg; + website.${system} = self.packages.${system}.website; + }; + }; }