When adding `nixpkgs` as flake-input using the `path`-fetcher, you
currently get the following error since neither `lastModifiedDate` nor
`lastModified` are stored in `flake.lock` for paths:
```
error: --- EvalError --------------------------------------------------------------------------- nix-build
at: (48:71) in file: /nix/store/147clg8svaxyj7pl80ra9kmmm72mdg94-source/flake.nix
47| system.nixos.versionSuffix =
48| ".${final.substring 0 8 (self.lastModifiedDate or self.lastModified)}.${self.shortRev or "dirty"}";
| ^
49| system.nixos.revision = final.mkIf (self ? rev) self.rev;
attribute 'lastModified' missing
```
This patch adds the fallback-value `19700101` to `versionSuffix` if none
of `lastModified{,Date}` are set in the lockfile.
This allows you to specify the system-wide flake registry. One use is
to pin 'nixpkgs' to the Nixpkgs version used to build the system:
nix.registry.nixpkgs.flake = nixpkgs;
where 'nixpkgs' is a flake input. This ensures that commands like
$ nix run nixpkgs#hello
pull in a minimum of additional store paths.
You can also use this to redirect flakes, e.g.
nix.registry.nixpkgs.to = {
type = "github";
owner = "my-org";
repo = "my-nixpkgs";
};