[Nix-dev] How to add (self-signed) SSL certificate to NixOS?

Kirill Elagin kirelagin at gmail.com
Mon Feb 2 17:08:45 CET 2015


`ca-bundle.crt` is actually just a text file with a list of certificates,
so I’m not sure what the error you get can possibly refer to. It should be
perfectly fine to do what you are trying to do.

Could it be that there was an error in your nix expression (e.g. you had
`.source` instead of `.text` or something like this)?

`Argument list too long` typically means that you're are trying to `cp`,
`mv` or something like this too many files in a single invocation. What is
exactly the shell command that produces the error?

On Mon Feb 02 2015 at 6:13:54 PM Bjørn Forsman <bjorn.forsman at gmail.com>
wrote:

> Hi,
>
> (Warning: I'm a SSL/certificate newbie.)
>
> I tried placing the certificate file (.crt) into /etc/ssl/certs/, next
> to the existing ca-bundle.crt. That didn't work. Strace showed that
> e.g. curl didn't even look at my file.
>
> Then I tried to append the certificate contents to the ca-bundle.crt:
>
>   environment.etc."ssl/certs/ca-bundle.crt".text = ''
>     ${builtins.readFile (pkgs.cacert + "/etc/ca-bundle.crt")}
>     ${builtins.readFile ./my-certificate.crt}
>   '';
>
> That failed too:
>
>   building path(s) '/nix/store/.....-etc-file'
>   while setting up the build environment: executing
> '/nix/store/....-bash-4.3-p30/bin/bash': Argument list too long
>   [exit error]
>
> What to do now?
>
> Best regards,
> Bjørn Forsman
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150202/45e054b6/attachment.html 


More information about the nix-dev mailing list