{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
outputs = { self, nixpkgs }:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
# https://github.com/NixOS/nixpkgs/blob/340a3345a23ad684a8c328eecc20bb0437e6954d/pkgs/development/haskell-modules/configuration-nix.nix#L1311
tailwind = pkgs.nodePackages.tailwindcss.overrideAttrs
(o: { plugins = [ pkgs.nodePackages."@tailwindcss/typography" ]; });
buildInputs = with pkgs; [
just
zola
] ++ [ tailwind ];
in
{
packages.x86_64-linux.default = pkgs.stdenv.mkDerivation {
name = "liljamo-dev-zola";
src = ./.;
inherit buildInputs;
buildPhase = ''
just build
'';
installPhase = ''
mkdir -p $out
cp -R public $out
'';
};
devShells.x86_64-linux.default = pkgs.mkShell {
buildInputs = with pkgs; [
tailwindcss-language-server
] ++ buildInputs;
};
};
}