Home Manager: Difference between revisions
m Sdht0 moved page Home Manager to Home manager: Misspelled title |
→Configuration: ~/.config/nixpkgs is the old path, ~/.config/home-manager is the new default |
||
Line 8: | Line 8: | ||
== Configuration == | == Configuration == | ||
Home Manager can be configured as a user in <code>~/.config/ | Home Manager can be configured as a user in <code>~/.config/home-manager/home.nix</code> or as a module inside configuration.nix. | ||
=== Installation as a user === | === Installation as a user === | ||
Line 14: | Line 14: | ||
Follow the [https://nix-community.github.io/home-manager/index.xhtml#ch-installation official guide] | Follow the [https://nix-community.github.io/home-manager/index.xhtml#ch-installation official guide] | ||
Your configuration is stored in <code>~/.config/ | Your configuration is stored in <code>~/.config/home-manager/home.nix</code>. Each time you modify it, rerun <code>home-manager switch</code> for changes to have effect. | ||
Note that to work correctly, home-manager needs your shell to source <code>~/.nix-profile/etc/profile.d/hm-session-vars.sh</code>. The most convenient way to do so is to have home-manager manage your whole shell configuration, eg <code>programs.bash.enable = true;</code> or <code>programs.zsh.enable = true;</code>. But in this case your whole bashrc is managed with Home Manager: the years of customization you accumulated in your former .bashrc must be migrated to Home Manager options, which may take some time. The quick and dirty way to do the migration is to move your bashrc to some other location and source it from Home Manager: | Note that to work correctly, home-manager needs your shell to source <code>~/.nix-profile/etc/profile.d/hm-session-vars.sh</code>. The most convenient way to do so is to have home-manager manage your whole shell configuration, eg <code>programs.bash.enable = true;</code> or <code>programs.zsh.enable = true;</code>. But in this case your whole bashrc is managed with Home Manager: the years of customization you accumulated in your former .bashrc must be migrated to Home Manager options, which may take some time. The quick and dirty way to do the migration is to move your bashrc to some other location and source it from Home Manager: |