website/flake.nix

43 lines
1.1 KiB
Nix
Raw Normal View History

2022-05-14 15:23:19 +00:00
{
description = "The website hosted at https://polynom.me";
inputs = {
2023-07-17 15:01:11 +00:00
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
2022-05-14 15:23:19 +00:00
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; };
2023-07-17 15:01:11 +00:00
tailwindWithTypography = pkgs.nodePackages.tailwindcss.overrideAttrs (old: {
plugins = [
pkgs.nodePackages."@tailwindcss/typography"
];
});
2022-05-14 15:23:19 +00:00
in {
default = pkgs.callPackage ./pkgs/website.nix {
shared-assets = assets.packages.${system}.default;
2023-07-17 15:01:11 +00:00
inherit tailwindWithTypography;
2022-05-14 15:23:19 +00:00
};
});
devShell = forAllSystems (system: let
pkgs = import nixpkgs { inherit system; };
pythonEnv = pkgs.python3.withPackages (ps: with ps; [ markdown ]);
in pkgs.mkShell {
buildInputs = with pkgs; [
pythonEnv
];
});
2022-05-14 15:23:19 +00:00
};
}