updated flake

This commit is contained in:
Wyatt J. Miller 2024-11-27 00:35:53 -05:00
parent 0093589a4b
commit 70578fd132

104
flake.nix
View File

@ -21,58 +21,62 @@
}; };
# Flake outputs that other flakes can use # Flake outputs that other flakes can use
outputs = { outputs =
self, { self
flake-schemas, , flake-schemas
nixpkgs, , nixpkgs
rust-overlay, , rust-overlay
nix-deno, , nix-deno
}: let ,
# Nixpkgs overlays }:
overlays = [ let
nix-deno.overlays.default # Nixpkgs overlays
rust-overlay.overlays.default overlays = [
(final: prev: { nix-deno.overlays.default
rustToolchain = final.rust-bin.stable.latest.default.override {extensions = ["rust-src"];}; rust-overlay.overlays.default
}) (final: prev: {
]; rustToolchain = final.rust-bin.stable.latest.default.override { extensions = [ "rust-src" ]; };
})
];
# Helpers for producing system-specific outputs # Helpers for producing system-specific outputs
supportedSystems = ["x86_64-linux" "aarch64-darwin" "x86_64-darwin" "aarch64-linux"]; supportedSystems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" "aarch64-linux" ];
forEachSupportedSystem = f: forEachSupportedSystem = f:
nixpkgs.lib.genAttrs supportedSystems (system: nixpkgs.lib.genAttrs supportedSystems (system:
f { f {
pkgs = import nixpkgs {inherit overlays system;}; pkgs = import nixpkgs { inherit overlays system; };
}); });
in { in
# Schemas tell Nix about the structure of your flake's outputs {
schemas = flake-schemas.schemas; # Schemas tell Nix about the structure of your flake's outputs
schemas = flake-schemas.schemas;
# Development environments # Development environments
devShells = forEachSupportedSystem ({pkgs}: { devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell { default = pkgs.mkShell {
# Pinned packages available in the environment # Pinned packages available in the environment
packages = with pkgs; [ packages = with pkgs; [
rustToolchain rustToolchain
rust-analyzer rust-analyzer
curl curl
git git
jq jq
wget wget
nixpkgs-fmt nixpkgs-fmt
openssl openssl
patchelf patchelf
deno deno
sqlx-cli sqlx-cli
]; ];
# Environment variables # Environment variables
env = { env = {
RUST_BACKTRACE = "1"; RUST_BACKTRACE = "1";
RUST_SRC_PATH = "${pkgs.rustToolchain}/lib/rustlib/src/rust/library"; RUST_SRC_PATH = "${pkgs.rustToolchain}/lib/rustlib/src/rust/library";
# PATH = "$PATH:$HOME/.local/share/nvim/mason/bin/deno"; ZELLIJ_CONFIG_FILE = "config.kdl";
# PATH = "$PATH:$HOME/.local/share/nvim/mason/bin/deno";
};
}; };
}; });
}); };
};
} }