edolstra / nix-serve

A standalone Nix binary cache server
GNU Lesser General Public License v2.1
163 stars 37 forks source link

Does not work with nix ca-derivations enabled #20

Open Mic92 opened 3 years ago

Mic92 commented 3 years ago

As @regnat reportet it does not handle /realisations, which results in http 500er errors when using it as a cache on a daemon with ca-derivations enabled.

fogti commented 3 years ago

Is there some working alternative? I tried using nix-serve from this repo combined with NixOS/nix as a source for the underlying nix+perl-bindings, but perl does not like it: either it somehow does not find Nix/Config.pm, otherwise it appears to error out inside some Manifest.pm or such...

Died at /nix/store/qhlldk0c44ssgiipizczq4f210hlgplr-nix-perl-2.4pre20210720_dd7bcf3/lib/perl5/site_perl/5.32.1/x86_64-linux-thread-multi/Nix/Manifest.pm line 236
Mic92 commented 3 years ago

Is there some working alternative? I tried using nix-serve from this repo combined with NixOS/nix as a source for the underlying nix+perl-bindings, but perl does not like it: either it somehow does not find Nix/Config.pm, otherwise it appears to error out inside some Manifest.pm or such...

Died at /nix/store/qhlldk0c44ssgiipizczq4f210hlgplr-nix-perl-2.4pre20210720_dd7bcf3/lib/perl5/site_perl/5.32.1/x86_64-linux-thread-multi/Nix/Manifest.pm line 236

The workaround is not enabling ca-derivations until nix-serve implements ca-derivation support.

fogti commented 3 years ago

Is there some other nix cache which does support this? I suppose ngi0 uses S3, right?

SuperSandro2000 commented 3 years ago

We explicitly need this type of cache and not S3 or some other cloud provider.

Mic92 commented 3 years ago

Maybe nix.sshServe.enable works because it's part of nix?

SuperSandro2000 commented 3 years ago

Is there some other nix cache which does support this? I suppose ngi0 uses S3, right?

yes, through hydra.

thufschmitt commented 3 years ago

Is there some other nix cache which does support this? I suppose ngi0 uses S3, right?

All the built-in store implementations support this. So ssh, ssh-ng, http(s), file, daemon and s3 stores should all be usable as a CA-aware binary cache