Home Manager: Difference between revisions
imported>Grxnola Adds how to use in a Flake |
imported>Saikatdas0790 m Fix typo: "it" -> "is" |
||
| Line 16: | Line 16: | ||
Your configuration is stored in <code>~/.config/nixpkgs/home.nix</code>. Each time you modify it, rerun <code>home-manager switch</code> for changes to have effect. | Your configuration is stored in <code>~/.config/nixpkgs/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 | 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: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
{ pkgs, ...}: { | { pkgs, ...}: { | ||