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

Kirill Elagin kirelagin at gmail.com
Mon Feb 2 17:40:00 CET 2015


On Mon Feb 02 2015 at 7:17:28 PM Bjørn Forsman <bjorn.forsman at gmail.com>
wrote:

> On 2 February 2015 at 17:08, Kirill Elagin <kirelagin at gmail.com> wrote:
> > `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.
>
> I agree.
>
> > Could it be that there was an error in your nix expression (e.g. you had
> > `.source` instead of `.text` or something like this)?
>
> No, the expression is correct. When I removed the big ca-bundle.crt
> file, the .text contents were small enough for the error to go away.
>
> > `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?
>
> I don't know the exact command, but seing as the error message goes
> away if the "text" content is small enough (e.g. <1k), I'm guessing
> it's implemented something like echo "${text}" > $dest.
>

Hm, yes, it is:
https://github.com/NixOS/nixpkgs/blob/
7ee3e777c3c88e4631b653338a7e1d9db108ae5a
/nixos/modules/system/etc/etc.nix#L115
https://github.com/NixOS/nixpkgs/blob/7ee3e777c3c88e4631b653338a7e1d9db108ae5a/pkgs/build-support/trivial-builders.nix#L29

Looks like you’ll have to come up with a more involved way of writing your
file, probably creating a new trivial builder as a result (e.g.
`mergeFiles` that takes a list of input file names and an output file name
and `cat`s the inputs to the output).
I couldn’t find anything similar in the library.


> - Bjørn
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150202/1778398e/attachment.html 


More information about the nix-dev mailing list