1 # Experimental flake interface to Nixpkgs.
2 # See https://github.com/NixOS/rfcs/pull/49 for details.
4 description = "A collection of packages for the Nix package manager";
8 jobs = import ./pkgs/top-level/release.nix {
14 forAllSystems = f: lib.genAttrs lib.systems.flakeExposed (system: f system);
18 lib = lib.extend (final: prev: {
20 nixos = import ./nixos/lib { lib = final; };
23 import ./nixos/lib/eval-config.nix (
25 modules = args.modules ++ [{
26 system.nixos.versionSuffix =
27 ".${final.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101")}.${self.shortRev or "dirty"}";
28 system.nixos.revision = final.mkIf (self ? rev) self.rev;
30 } // lib.optionalAttrs (! args?system) {
31 # Allow system to be set modularly in nixpkgs.system.
32 # We set it to null, to remove the "legacy" entrypoint's
33 # non-hermetic default.
39 checks.x86_64-linux.tarball = jobs.tarball;
42 nixpkgsManual = jobs.manual;
43 nixosManual = (import ./nixos/release-small.nix {
45 }).nixos.manual.x86_64-linux;
48 # The "legacy" in `legacyPackages` doesn't imply that the packages exposed
49 # through this attribute are "legacy" packages. Instead, `legacyPackages`
50 # is used here as a substitute attribute name for `packages`. The problem
51 # with `packages` is that it makes operations like `nix flake show
52 # nixpkgs` unusably slow due to the sheer number of packages the Nix CLI
53 # needs to evaluate. But when the Nix CLI sees a `legacyPackages`
54 # attribute it displays `omitted` instead of evaluating all packages,
55 # which keeps `nix flake show` on Nixpkgs reasonably fast, though less
57 legacyPackages = forAllSystems (system: import ./. { inherit system; });
60 notDetected = import ./nixos/modules/installer/scan/not-detected.nix;