`attic-server` does not get fetched from the binary cache

Hi,
I am trying to install the attic binary cache on an aarch64 VPS, but it lacks the resources to build atticd every time. I found out that atticd is built as part of nixpkgs, but now I wonder why it does not get fetched from the binary cache. I have disabled all overlays in the NixOS module and made sure to set the package to pkgs.attic-server. I have also tried using it in a nix shell, which triggered a rebuild as well.

Has anyone experienced a similar issue or maybe has a clue as to what the cause might be?

Hm so it seems like there is no build job for it in unstable/aarch64-linux or 24.05/aarch64-linux which I am using. @aciceri @zhaofengli I am not sure what the official procedure for this is, as it is more a hydra thing that a nixpkgs thing, but maybe you can help anyway?

[jzbor@desktop-i5] ~ hydra-check attic-server --channel 24.05 --arch aarch64-linux             
Build Status for nixpkgs.attic-server.aarch64-linux on 24.05
⚠ This job is not a member of the latest evaluation of its jobset. This means it was removed or had an evaluation error.

[jzbor@desktop-i5] ~ hydra-check attic-server --channel 24.05 --arch x86_64-linux              
Build Status for nixpkgs.attic-server.x86_64-linux on 24.05
✔ attic-0.1.0 from 2024-05-22 - https://hydra.nixos.org/build/260924153

This was fixed by attic-server: fix faulty meta attrs override for mainProgram by Shawn8901 · Pull Request #318784 · NixOS/nixpkgs · GitHub.

1 Like

Changes should have been landed on nixos-unstable (yesterday) and nixos-24.05 on today’s channel bump.

I do have to wait a little until they are also available in the binary cache right?

EDIT: I am still confused, as to why Hydra - nixos:release-24.05:nixpkgs.attic-server.aarch64 does not show any result, while Hydra - Build 262716795 of job nixos:release-24.05:nixpkgs.attic-server.aarch64-linux does. Also substitution still does not work on my system.

On the first link you forgot the Linux, don’t you?

https://hydra.nixos.org/job/nixos/release-24.05/nixpkgs.attic-server.aarch64-linux

With Hydra-Check it now shows up

[nix-shell:~]$ hydra-check attic-server --channel 24.05 --arch aarch64-linux
Build Status for nixpkgs.attic-server.aarch64-linux on 24.05
✔ attic-0.1.0 from 2024-06-12 - https://hydra.nixos.org/build/262716795

And substitution works fine on my aarch64-linux

nix-shell -p attic-server                                                              this path will be fetched (8.98 MiB download, 41.25 MiB unpacked):
  /nix/store/q8gj39xa0bsnhx7rnzdrbp66cmp1bp1d-attic-0.1.0
copying path '/nix/store/q8gj39xa0bsnhx7rnzdrbp66cmp1bp1d-attic-0.1.0' from 'https://cache.nixos.org'...

[nix-shell:~]$ uname -a
Linux watchtower 6.6.32 #1-NixOS SMP Sat May 25 14:22:56 UTC 2024 aarch64 GNU/Linux

So are you sure that you are on the right nixpkgs commit?

Oh yeah you are right. I didn’t notice that hydra-check just pastes the parameters.

[jzbor@desktop-i5] ~/Programming/Nix/nixos-cloud nix flake update                   ±[●●][main]
warning: Git tree '/home/jzbor/Programming/Nix/nixos-cloud' is dirty
warning: updating lock file '/home/jzbor/Programming/Nix/nixos-cloud/flake.lock':
• Updated input 'deploy-rs':
    'github:serokell/deploy-rs/b3ea6f333f9057b77efd9091119ba67089399ced' (2024-05-14)
  → 'github:serokell/deploy-rs/3867348fa92bc892eba5d9ddb2d7a97b9e127a8a' (2024-06-12)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/805a384895c696f802a9bf5bf4720f37385df547' (2024-05-31)
  → 'github:nixos/nixpkgs/cc54fb41d13736e92229c21627ea4f22199fee6b' (2024-06-12)
warning: Git tree '/home/jzbor/Programming/Nix/nixos-cloud' is dirty
[jzbor@desktop-i5] ~/Programming/Nix/nixos-cloud nix run .#deploy_fsn1-03           ±[●●][main]
warning: Git tree '/home/jzbor/Programming/Nix/nixos-cloud' is dirty
🚀 ℹ️ [deploy] [INFO] Evaluating flake in .
warning: Git tree '/home/jzbor/Programming/Nix/nixos-cloud' is dirty
🚀 ℹ️ [deploy] [INFO] The following profiles are going to be deployed:
[fsn1-03.system]
user = "root"
ssh_user = "root"
path = "/nix/store/c3q55rca67zr8iqri127gbcgffrr8xdv-activatable-nixos-system-fsn1-03-24.05.20240612.cc54fb4"
hostname = "****"
ssh_opts = []

🚀 ℹ️ [deploy] [INFO] Building profile `system` for node `fsn1-03` on remote host
[1/0/16 built, 0.0 MiB DL] building attic-server-deps-0.1.0 (buildPhase):     Checking bytes v1

As far as I can tell this is the right commit, but it starts to build the attic crate nevertheless.

EDIT: Curiously enough it works inside a shell just fine.

Gets the attics pulled in by the module? I wanted to check that some days ago as it was breaking by a nixpkgs follow but did not find the time yet

Yes it does, but as far as I can tell it is the the regular nixpkgs attic-server package

So this is very interesting:
If I set

services.atticd.package = nixpkgs.legacyPackages.aarch64-linux.attic-server;

it works just fine, but if I use

services.atticd.package = pkgs.attic-server;

And set pkgs = nixpkgs.legacyPackages.aarch64-linux in my nixosSystem call it triggers a rebuild.

Sooooo, i looked the behavior now.
The problem is the attic flake and module. The flake exposes a module called the same (so attic-server) and the flake automatically applies and overlay on two positions:

One is on the modules default:

and then when services.atticd.useFlakeCompatOverlay is set to true (which is the default vaule but the flakes root module disables that behavior) here attic/nixos/atticd.nix at 717cc95983cdc357bc347d70be20ced21f935843 · zhaofengli/attic · GitHub

So when you import the module like this:

 imports = [ (inputs.attic + "/nixos/atticd.nix") ];

and set

services.atticd.useFlakeCompatOverlay = false;

it should pick up the nixpkgs package.

That a overlay is the problem is also an idication that it worked with nixpkgs.legacyPackages.aarch64-linux.attic-server;, which has no overlays applied.

Thanks alot, this solved my issues! I tried playing around with the useFlakeCompatOverlay, but I still used the module as flake output - including the file directly this fixed it!