4.flake-parts/template/multi-module/flake.nix
Shea Levy 13dddfdc67
Only depend on nixpkgs/lib.
This reflects the actual requirements of the core flake-parts
functionality and removes any possible confusion about where lib comes
from (always flake-parts's input) vs where pkgs comes from (always the
flake's nixpkgs input). Flakes which use flake-parts should only ever
have to override its input in the very unlikely event of a bug in lib.

Hopefully lib will be separated into its own flake some day, which
will also make this a much smaller footprint.
2022-10-11 13:59:40 -04:00

28 lines
868 B
Nix

{
description = "Description for the project";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit self; } {
imports = [
./hello/flake-module.nix
];
systems = [ "x86_64-linux" "aarch64-darwin" ];
perSystem = { config, self', inputs', ... }: {
# Per-system attributes can be defined here. The self' and inputs'
# module parameters provide easy access to attributes of the same
# system.
packages.figlet = inputs'.nixpkgs.legacyPackages.figlet;
};
flake = {
# The usual flake attributes can be defined here, including system-
# agnostic ones like nixosModule and system-enumerating ones, although
# those are more easily expressed in perSystem.
};
};
}