[Nix-dev] writing a muttrc configuration file

Hendrik Bunke bunke.hendrik at gmail.com
Fri May 29 12:14:32 CEST 2015


--On 2015-05-29 17:58, stewart mackenzie wrote:
> Hi,
> 
> So I'm trying to write the mutt configuration file using this:
> 
> let
>   muttConfigFile = pkgs.writeTextFile {
>     name = "muttrc";
>     text = ''
>         set spoolfile=/var/spool/mail/root/
>     '';
>     executable = false;
>     destination = "/root/.muttrc";
>   };
> {
>   environment = {
>     systemPackages = with pkgs; [
>       ... muttConfigFile ];
>   };
> }
> 
> The file is not written to /root/.muttrc, so where does the file go?

Most probably in the generated package directory (nix/store/...).
writeTextFile appends destination to $out/, so it's
$out/root/.muttrc.

regards
hendrik

-- 
Dr. Hendrik Bunke
http://gplus.to/hbunke
http://twitter.com/hbunke
http://www.hbxt.org


More information about the nix-dev mailing list