Adds Flake.nix and .envrc

This commit is contained in:
Drew Haven 2025-06-10 19:27:46 -07:00
parent cf0a2022c8
commit 0f0025219c
2 changed files with 53 additions and 0 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
use flake

52
flake.nix Normal file
View 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
];
};
}
);
};
}