Files
cheatsheet-tldr/tldr/home-manager
2025-03-21 00:18:36 +00:00

30 lines
794 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# home-manager
> Manage a per-user environment using Nix, allowing declarative configuration of the users home.
> More information: <https://github.com/nix-community/home-manager>.
- Build the configuration defined in `~/.config/nixpkgs/home.nix` without applying it:
`home-manager build`
- Build and apply (switch to) the new configuration:
`home-manager switch`
- Roll back to a previous configuration generation:
`home-manager rollback`
- List all existing configuration generations:
`home-manager generations`
- When using flakes, run any operation that requires nix to run (build, switch, news) by passing the path to the flake:
`home-manager {{command}} --flake {{path/to/flake}}`