Hi,
On 06/01/16 00:52, Mateusz Czaplinski wrote:
> Is it possible to easily create files like with writeText, but such that
> they're
> "chmod 400" *before* the contents is written?
>
> From what I've read, NetworkManager expects to have network definitions as
> chmod
> 400 files in /etc/NetworkManager/system-connections/ IIRC. I'm trying to
> create
> them via appending to "environment.etc" property, but don't know how to make
> them root-only readable.
You can specify a mode, e.g.
environment.etc."NetworkManager/bla" =
{ mode = "0400";
source = writeText ...;
};
However, this won't help much because "source" (and the derivation that produced
it) are still world-readable.
--
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev