Wrappers vs. Dotfiles: Difference between revisions

imported>Fzakaria
Added wrapProgram example
imported>Fzakaria
Remove incorrect suggestion
Line 13: Line 13:
}
}
</syntaxhighlight>
</syntaxhighlight>
Consider also using the simpler ''wrapProgram'' utility
<syntaxhighlight lang="nix">
{
  users.users.root.packages = [
    (pkg.wrapProgram ${pkgs.htop}/bin/htop --set HTOPRC ${pkgs.writeText "htoprc" ...}
  ];
}
</syntaxhighlight>


=== Downside of the Wrapper Approach ===
=== Downside of the Wrapper Approach ===