reddit-magnet/flake.nix
Marc Plano-Lesay 5bf38fdac3
All checks were successful
Build and test / Clippy (pull_request) Successful in 49s
Build and test / Generate Documentation (pull_request) Successful in 45s
Build and test / Build AMD64 (pull_request) Successful in 50s
Checking yaml / Run yamllint (pull_request) Successful in 5s
Checking Renovate configuration / validate (pull_request) Successful in 1m30s
Build and test / Tests (pull_request) Successful in 2m34s
chore: migrate to Forgejo
2025-11-05 18:14:08 +11:00

39 lines
997 B
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
pre-commit-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{ self
, nixpkgs
, flake-utils
, ...
}@inputs:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
# Place all toolchain components in a single directory for IntelliJ
rust-toolchain = pkgs.symlinkJoin {
name = "rust-toolchain";
paths = with pkgs; [
rustc
cargo
rustPlatform.rustcSrc
] ++ lib.optionals stdenv.isDarwin [
libiconv
];
};
in
{
checks = import ./nix/git-hooks.nix { inherit inputs pkgs; };
devShells = import ./nix/shell.nix { inherit pkgs rust-toolchain self; inherit (pkgs) lib; };
formatter = pkgs.nixpkgs-fmt;
});
}