NixOS/nix — pull request #329 by nbp (2014-08-25 23:00:57+00:00)
Title: WIP: Enable secret content in the nix-store.

This set of patches add a SecretMode class. This class is used to prevent doing permissive chmod on the content of the nix-store. The instances of this class are initialized with a few functions which are used to collect the name of the user which will own the file.

In order to test this features, these patches are adding builtins.toSecretFile primitive, and a special attribute named "secret" to the attribute set argument of derivations. The "secret" attribute expect a boolean value. Both the "secret" attribute and the "toSecretFile" primitives make the derivation/output only readable by the owner of the nix-store.