mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2025-03-16 21:38:24 +00:00
18 lines
No EOL
576 B
Nix
18 lines
No EOL
576 B
Nix
|
|
# Definitions can be imported from a separate file like this one
|
|
|
|
{ self, ... }: {
|
|
perSystem = system: { config, self', inputs', ... }: {
|
|
# Definitions like this are entirely equivalent to the ones
|
|
# you may have directly in flake.nix.
|
|
packages.hello = inputs'.nixpkgs.legacyPackages.hello;
|
|
};
|
|
flake = {
|
|
nixosModules.hello = { pkgs, ... }: {
|
|
environment.systemPackages = [
|
|
# or self.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system}.hello
|
|
self.packages.${pkgs.stdenv.hostPlatform.system}.hello
|
|
];
|
|
};
|
|
};
|
|
} |