1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2025-03-05 16:36:56 +00:00
flake-parts/template/multi-module/hello/flake-module.nix
DavHau cecf9e179c
add lib argument to multi-module template
Might be biased by my use cases but I nearly always need lib. Even if not it doesn't hurt to have it.
2023-01-10 15:33:53 +08:00

17 lines
553 B
Nix

# Definitions can be imported from a separate file like this one
{ self, lib, ... }: {
perSystem = { config, self', inputs', pkgs, ... }: {
# Definitions like this are entirely equivalent to the ones
# you may have directly in flake.nix.
packages.hello = pkgs.hello;
};
flake = {
nixosModules.hello = { pkgs, ... }: {
environment.systemPackages = [
# or self.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system}.hello
self.packages.${pkgs.stdenv.hostPlatform.system}.hello
];
};
};
}