dgnum.eu/flake.nix

34 lines
958 B
Nix

{
description = "Website for dgnum.eu";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
ssg = pkgs.callPackage ./ssg { };
defaultInputs = with pkgs; [ nixfmt shellcheck ];
in {
formatter = pkgs.nixfmt;
devShells = {
default = pkgs.mkShell { buildInputs = [ ssg ] ++ defaultInputs; };
ssg = pkgs.haskellPackages.shellFor {
packages = _: [ ssg ];
buildInputs = with pkgs.haskellPackages;
[ cabal-install ghcid hlint ] ++ defaultInputs;
};
};
packages = {
inherit ssg;
site = pkgs.callPackage ./site { inherit ssg; };
};
defaultPackage = self.packages.${system}.site;
});
}