Home Manager: Difference between revisions
imported>Krey No edit summary |
imported>Krey No edit summary |
||
Line 11: | Line 11: | ||
"${builtins.fetchTarball https://github.com/rycee/home-manager/archive/master.tar.gz}/nixos" | "${builtins.fetchTarball https://github.com/rycee/home-manager/archive/master.tar.gz}/nixos" | ||
]; | ]; | ||
home-manager.users. | home-manager.users.my_username = { ... } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Managing your dotfiles == | |||
Home Manager has options to configure many common tools. As an example, adding the following | |||
<syntaxhighlight lang="nix> | |||
programs.git = { | |||
enable = true; | |||
userName = "my_git_username"; | |||
userEmail = "my_git_username@gmail.com"; | |||
}; | |||
</syntaxhighlight> | |||
will make Home Manager generate a .config/git/config file for you. | |||
Even for programs for which Home Manager doesn't have configuration options, you can use it to manage your dotfiles, e.g. | |||
<syntaxhighlight lang="nix"> | |||
home.file.".config/i3blocks/config".source = "${my-dotfile-dir}/i3blocks.conf" | |||
</syntaxhighlight> | |||
=== Examples === | === Examples === | ||
* [https://github.com/yrashk/nix-home/blob/master/home.nix Yurii Rashkovskii's home.nix] | * [https://github.com/yrashk/nix-home/blob/master/home.nix Yurii Rashkovskii's home.nix] |