site.lyte.dev/flake.nix

27 lines
733 B
Nix
Raw Permalink Normal View History

2023-10-06 17:04:53 -05:00
{
2024-06-14 11:06:31 -05:00
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
2023-10-06 17:04:53 -05:00
outputs = {
nixpkgs,
2024-06-14 11:06:31 -05:00
self,
}: let
systems = ["aarch64-linux" "aarch64-darwin" "x86_64-darwin" "x86_64-linux"];
2024-07-08 16:26:51 -05:00
genSystemAttrs = nixpkgs.lib.genAttrs systems;
2024-06-14 11:06:31 -05:00
pkgsFor = system: import nixpkgs {inherit system;};
2024-07-08 16:26:51 -05:00
pkgsGen = f: (genSystemAttrs (system: (f (pkgsFor system))));
2024-06-14 11:06:31 -05:00
buildDeps = pkgs: with pkgs; [hugo tailwindcss];
infraDeps = pkgs: with pkgs; [netlify-cli];
in {
2024-07-08 16:26:51 -05:00
packages = pkgsGen (pkgs: {
stylesheet = pkgs.callPackage ./nix/packages/stylesheet.nix {};
});
devShells = pkgsGen (pkgs: {
2024-06-14 11:06:31 -05:00
default = pkgs.mkShell {
buildInputs = (buildDeps pkgs) ++ (infraDeps pkgs);
2023-10-06 17:04:53 -05:00
};
});
2024-06-14 11:06:31 -05:00
};
2023-10-06 17:04:53 -05:00
}