[Nix-dev] config file with a password

Mathijs Kwik mathijs at bluescreen303.nl
Sun Feb 26 00:14:56 CET 2012


Hi all,

I'm currently packaging gogoclient ( an ipv6 tunneling client ) and
writing a nixos module for it.
It needs a config file which has a password in it. It's quite a big
config, which I want to fill in from nix config options, so I don't
want to tell people to just supply the full file themselves.

Ofcourse I don't want people to enter the password into their
configuration.nix, but I would like to provide an option to provide a
path to a separate file on a secure place, or they can use
builtins.readFile.
Also, I would like to use the default upstream config as a basis (the
package stores this at $out/share/gogoclient-1.2/default.conf), to
ease future upstream changes. So no embedded config in the module
which has to be maintained.

I can probably use something like system.activationScripts to just
copy the default to some place in /etc, chmod that, and substitute
values in there, but it doesn't feel very elegant.

Any suggestions?

Thanks,
Mathijs


More information about the nix-dev mailing list