diff --git a/tips/README.md b/tips/README.md index cf7de3b..691aeea 100644 --- a/tips/README.md +++ b/tips/README.md @@ -2,4 +2,5 @@ - [Debug insecure package error](./debug_insecure_package.md) - [How try pull request](./how_to_test_pr.md) -- [Build and run VM from nixos configuration](./test_on_vm.md) \ No newline at end of file +- [Build and run VM from nixos configuration](./test_on_vm.md) +- [Home Manager on others distros](./home_manager.md) \ No newline at end of file diff --git a/tips/home_manager.md b/tips/home_manager.md new file mode 100644 index 0000000..19f91ff --- /dev/null +++ b/tips/home_manager.md @@ -0,0 +1,32 @@ +# Home Manager on others distros + +## Install home-manager + +1. Add `nixpkgs` and `home-manager` channels + +```bash +nix-channel --add https://nixos.org/channels/nixpkgs-unstable +nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager +nix-channel --update +``` + +2. Install `home-manager` + +```bash +export NIX_PATH=$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels${NIX_PATH:+:$NIX_PATH} +nix-shell '' -A install +``` + +## How use home-manager + +1. Switch + +```bash +home-manager switch --flake .#perso-home +``` + +2. List generations + +```bash +home-manager generations +``` \ No newline at end of file