site.lyte.dev/flake.nix
2024-07-08 16:26:51 -05:00

27 lines
733 B
Nix

{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
outputs = {
nixpkgs,
self,
}: let
systems = ["aarch64-linux" "aarch64-darwin" "x86_64-darwin" "x86_64-linux"];
genSystemAttrs = nixpkgs.lib.genAttrs systems;
pkgsFor = system: import nixpkgs {inherit system;};
pkgsGen = f: (genSystemAttrs (system: (f (pkgsFor system))));
buildDeps = pkgs: with pkgs; [hugo tailwindcss];
infraDeps = pkgs: with pkgs; [netlify-cli];
in {
packages = pkgsGen (pkgs: {
stylesheet = pkgs.callPackage ./nix/packages/stylesheet.nix {};
});
devShells = pkgsGen (pkgs: {
default = pkgs.mkShell {
buildInputs = (buildDeps pkgs) ++ (infraDeps pkgs);
};
});
};
}