1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2025-03-16 21:38:24 +00:00
flake-parts/template/multi-module/hello/flake-module.nix

18 lines
556 B
Nix
Raw Normal View History

2022-05-11 23:05:53 +02:00
# Definitions can be imported from a separate file like this one
{ self, ... }: {
2022-05-18 11:03:42 +02:00
perSystem = system: { config, self', inputs', pkgs, ... }: {
2022-05-11 23:05:53 +02:00
# Definitions like this are entirely equivalent to the ones
# you may have directly in flake.nix.
2022-05-18 11:03:42 +02:00
packages.hello = pkgs.hello;
2022-05-11 23:05:53 +02:00
};
flake = {
nixosModules.hello = { pkgs, ... }: {
environment.systemPackages = [
# or self.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system}.hello
self.packages.${pkgs.stdenv.hostPlatform.system}.hello
];
};
};
2022-05-17 10:28:03 +02:00
}