This repository has been archived on 2024-02-04. You can view files and clone it, but cannot push or open issues or pull requests.
blog.polynom.me/flake.nix

43 lines
1.1 KiB
Nix

{
description = "The blog hosted at https://blog.polynom.me";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
assets.url = "git+https://git.polynom.me/polynom.me/shared-assets.git";
};
outputs = {
self,
nixpkgs,
assets
}: let
supportedSystems = [ "x86_64-linux" ];
forAllSystems = nixpkgs.lib.attrsets.genAttrs supportedSystems;
in {
packages = forAllSystems (system: let
pkgs = import nixpkgs { inherit system; };
tailwindWithTypography = pkgs.nodePackages.tailwindcss.overrideAttrs (old: {
plugins = [
pkgs.nodePackages."@tailwindcss/typography"
];
});
in {
default = pkgs.callPackage ./pkgs/blog.nix {
shared-assets = assets.packages.${system}.default;
inherit tailwindWithTypography;
};
});
devShell = forAllSystems (system: let
pkgs = import nixpkgs { inherit system; };
pythonEnv = pkgs.python3.withPackages (ps: with ps; [ markdown ]);
in pkgs.mkShell {
buildInputs = with pkgs; [
pythonEnv gnumake imagemagick
];
});
};
}