2024-09-03 00:17:19 -05:00
|
|
|
# This flake was initially generated by fh, the CLI for FlakeHub (version 0.1.10)
|
|
|
|
{
|
2024-09-21 22:57:23 -05:00
|
|
|
# A helpful description of your flake
|
2024-09-29 20:16:20 -05:00
|
|
|
description = "My personal website v2";
|
2024-09-03 00:17:19 -05:00
|
|
|
|
2024-09-21 22:57:23 -05:00
|
|
|
# Flake inputs
|
2024-09-03 00:17:19 -05:00
|
|
|
inputs = {
|
2024-09-21 22:57:23 -05:00
|
|
|
flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/*.tar.gz";
|
|
|
|
|
2024-09-03 00:17:19 -05:00
|
|
|
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz";
|
2024-09-21 22:57:23 -05:00
|
|
|
|
|
|
|
rust-overlay = {
|
|
|
|
url = "github:oxalica/rust-overlay";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-09-29 20:16:20 -05:00
|
|
|
|
|
|
|
nix-deno = {
|
|
|
|
url = "github:nekowinston/nix-deno";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-09-03 00:17:19 -05:00
|
|
|
};
|
|
|
|
|
2024-09-21 22:57:23 -05:00
|
|
|
# Flake outputs that other flakes can use
|
2024-09-22 03:09:17 -05:00
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
flake-schemas,
|
|
|
|
nixpkgs,
|
|
|
|
rust-overlay,
|
2024-09-29 20:16:20 -05:00
|
|
|
nix-deno,
|
2024-09-22 03:09:17 -05:00
|
|
|
}: let
|
|
|
|
# Nixpkgs overlays
|
|
|
|
overlays = [
|
2024-09-29 20:16:20 -05:00
|
|
|
nix-deno.overlays.default
|
2024-09-22 03:09:17 -05:00
|
|
|
rust-overlay.overlays.default
|
|
|
|
(final: prev: {
|
|
|
|
rustToolchain = final.rust-bin.stable.latest.default.override {extensions = ["rust-src"];};
|
|
|
|
})
|
|
|
|
];
|
2024-09-21 22:57:23 -05:00
|
|
|
|
2024-09-22 03:09:17 -05:00
|
|
|
# Helpers for producing system-specific outputs
|
|
|
|
supportedSystems = ["x86_64-linux" "aarch64-darwin" "x86_64-darwin" "aarch64-linux"];
|
|
|
|
forEachSupportedSystem = f:
|
|
|
|
nixpkgs.lib.genAttrs supportedSystems (system:
|
|
|
|
f {
|
|
|
|
pkgs = import nixpkgs {inherit overlays system;};
|
|
|
|
});
|
|
|
|
in {
|
|
|
|
# Schemas tell Nix about the structure of your flake's outputs
|
|
|
|
schemas = flake-schemas.schemas;
|
2024-09-21 22:57:23 -05:00
|
|
|
|
2024-09-22 03:09:17 -05:00
|
|
|
# Development environments
|
|
|
|
devShells = forEachSupportedSystem ({pkgs}: {
|
|
|
|
default = pkgs.mkShell {
|
|
|
|
# Pinned packages available in the environment
|
|
|
|
packages = with pkgs; [
|
|
|
|
rustToolchain
|
|
|
|
rust-analyzer
|
|
|
|
curl
|
|
|
|
git
|
|
|
|
jq
|
|
|
|
wget
|
|
|
|
nixpkgs-fmt
|
|
|
|
openssl
|
2024-09-29 20:16:20 -05:00
|
|
|
patchelf
|
2024-09-22 03:09:17 -05:00
|
|
|
deno
|
|
|
|
sqlx-cli
|
|
|
|
];
|
2024-09-21 22:57:23 -05:00
|
|
|
|
2024-09-22 03:09:17 -05:00
|
|
|
# Environment variables
|
|
|
|
env = {
|
|
|
|
RUST_BACKTRACE = "1";
|
|
|
|
RUST_SRC_PATH = "${pkgs.rustToolchain}/lib/rustlib/src/rust/library";
|
2024-09-29 20:16:20 -05:00
|
|
|
# PATH = "$PATH:$HOME/.local/share/nvim/mason/bin/deno";
|
2024-09-03 00:17:19 -05:00
|
|
|
};
|
2024-09-22 03:09:17 -05:00
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
2024-09-03 00:17:19 -05:00
|
|
|
}
|