Adds Flake.nix and .envrc
This commit is contained in:
52
flake.nix
Normal file
52
flake.nix
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
description = "Blazestar.net homepage";
|
||||||
|
|
||||||
|
# Flake inputs
|
||||||
|
inputs = {
|
||||||
|
flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/*";
|
||||||
|
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Flake outputs that other flakes can use
|
||||||
|
outputs =
|
||||||
|
{
|
||||||
|
self,
|
||||||
|
flake-schemas,
|
||||||
|
nixpkgs,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
# Helpers for producing system-specific outputs
|
||||||
|
supportedSystems = [ "x86_64-linux" ];
|
||||||
|
forEachSupportedSystem =
|
||||||
|
f:
|
||||||
|
nixpkgs.lib.genAttrs supportedSystems (
|
||||||
|
system:
|
||||||
|
f {
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
}
|
||||||
|
);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# Schemas tell Nix about the structure of your flake's outputs
|
||||||
|
schemas = flake-schemas.schemas;
|
||||||
|
|
||||||
|
# Development environments
|
||||||
|
devShells = forEachSupportedSystem (
|
||||||
|
{ pkgs }:
|
||||||
|
{
|
||||||
|
default = pkgs.mkShell {
|
||||||
|
packages = with pkgs; [
|
||||||
|
git # Version control
|
||||||
|
nodejs_22 # Base language utils
|
||||||
|
eslint # Linting
|
||||||
|
astro-language-server # LSP
|
||||||
|
nodePackages.prettier # Formatting
|
||||||
|
nixpkgs-fmt # Formatting
|
||||||
|
drill # Benchmarking
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user