What does "error: input attribute 'lastModified' is not an integer" mean from "nix flake update"?

While updating a system from 25.05 to 25.11:

# nix flake update --commit-lock-file
error:
   … while updating the lock file of flake '[redacted]'
   … while updating the flake input 'nixpkgs'
   … while fetching the input 'https://channels.nixos.org/nixos-25.11/nixexprs.tar.xz'
   error: input attribute 'lastModified' is not an integer

What does this mean and what should I do about it?

Without seeing the actual lock entry, that’s hard to say exactly, though on first glance, I’d say the entries last modified is not an integer.

It sure looks like it’s an integer in flake.lock:

{
  "nodes": {
    "nixpkgs": {
      "locked": {
        "lastModified": 1765311797,
        "narHash": "sha256-3bKCEc1JWOn8aj48H1yHKU6WDw0eSU2t7cKCL3FC+Lo=",
        "rev": "09eb77e94fa25202af8f3e81ddc7353d9970ac1b",
        "type": "tarball",
        "url": "https://releases.nixos.org/nixos/25.11/nixos-25.11.1335.09eb77e94fa2/nixexprs.tar.xz?lastModified=1765311797&rev=09eb77e94fa25202af8f3e81ddc7353d9970ac1b"
      },
      "original": {
        "type": "tarball",
        "url": "https://channels.nixos.org/nixos-25.11/nixexprs.tar.xz"
      }
    },
    // etc
  }
  // etc
}

I do not know how to find out what it is in the file it tried to download.

I think this must be some kind of incompatibility between nix in 25.05 and nixpkgs tarballs from the 25.11 branch; after updating nix itself to 25.11 by hand, ‘nix flake update’ worked fine.

I doubt I can be bothered to investigate further; in case anyone else wants to, the troublesome nixexprs.tar.xz has this URL:

https://releases.nixos.org/nixos/25.11/nixos-25.11.1571.28bb483c11a1/nixexprs.tar.xz?lastModified=1765608474&rev=28bb483c11a1214a73f9fd2d9928a6e2ea86ec71

and here’s the relevant chunk of the lockfile diff as generated by the newer nix:

@@ -39,11 +39,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1765311797,
-        "narHash": "sha256-3bKCEc1JWOn8aj48H1yHKU6WDw0eSU2t7cKCL3FC+Lo=",
-        "rev": "09eb77e94fa25202af8f3e81ddc7353d9970ac1b",
+        "lastModified": 1765608474,
+        "narHash": "sha256-DBrujM5egJzWx9+AP14FAsaMrnFpt7q++OV0BDHSMPc=",
+        "rev": "28bb483c11a1214a73f9fd2d9928a6e2ea86ec71",
         "type": "tarball",
-        "url": "https://releases.nixos.org/nixos/25.11/nixos-25.11.1335.09eb77e94fa2/nixexprs.tar.xz?lastModified=1765311797&rev=09eb77e94fa25202af8f3e81ddc7353d9970ac1b"
+        "url": "https://releases.nixos.org/nixos/25.11/nixos-25.11.1571.28bb483c11a1/nixexprs.tar.xz?lastModified=1765608474&rev=28bb483c11a1214a73f9fd2d9928a6e2ea86ec71"
       },
       "original": {
         "type": "tarball",

nix run github:nixos/nixpkgs/nixos-25.11#nix -- flake update might’ve been an easy way to escape whatever the bug was.

1 Like

Yeah, that would have been much easier than what I wound up doing :slight_smile: