[Nix-dev] Nix as a dotfiles manager
Arseniy Seroka
ars.seroka at gmail.com
Sun Nov 30 21:29:58 CET 2014
Hello!
I want to do smth like
`if networking.name = "foo"
then writeFile "/home/user/.dorfile"
else if networking.name = "bar" then ...`.
But it turnes out that I have no idea how to do it.
So the questions are: is it a good idea to use nix as a dotfiles manager?
And what is a best way to do it?
I thought smth like: now we are making pkgs and making symlinks to their
executable to ls `~/.nix-profile/bin/`.
Maybe there is a way for some derivation set the "output path" as a `~/`
and do smth like (write it in a ~/.nixpkgs/config.nix):
`configs = buildConfigEnv "~/" [
{ name = ".zshrc"; contents = ''#zshrc config''
}
]`
If it is possible, please give me some hints or smth and I will try to
implement it (if it is a good idea).
This way, IMO, we would provide a good mechanism for a dotfiles managing at
several machines.
--
Sincerely,
Arseniy Seroka
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20141201/3b4e5d2d/attachment.html
More information about the nix-dev
mailing list