Files
exo/nix/modules/flake-root.nix
T
Evan Quiney 38ff949bf4 big refactor
Fix. Everything.

Co-authored-by: Andrei Cravtov <the.andrei.cravtov@gmail.com>
Co-authored-by: Matt Beton <matthew.beton@gmail.com>
Co-authored-by: Alex Cheema <alexcheema123@gmail.com>
Co-authored-by: Seth Howes <sethshowes@gmail.com>
2025-09-30 11:03:04 +01:00

21 lines
592 B
Nix

# Provides path to project root with:
# 1. ${lib.getExe config.flake-root.package}
# 2. $FLAKE_ROOT environment-varible
# These values would bind to the consumer flake when this flake module is imported:
{ inputs, ... }:
# The actual flake-parts module configuration
{
imports = [ inputs.flake-root.flakeModule ];
perSystem =
{ config, ... }:
{
flake-root.projectRootFile = "flake.nix"; # Not necessary, as flake.nix is the default
make-shells.default = {
inputsFrom = [ config.flake-root.devShell ]; # Adds $FLAKE_ROOT to environment
};
};
}