1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 11:36:05 +01:00

home-manager: move profile management

This commit separates profile management (setting profile and creating
GC root) from file management (removing and adding managed files
within the user's home directory).

This is a step towards deprecating profile management within the
activation script, instead relying on the caller of the activation
script managing the profile.
This commit is contained in:
Robert Helgesson 2024-12-28 23:46:50 +01:00
parent 1e2a9d2d29
commit 1e68dc759b
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED
6 changed files with 92 additions and 133 deletions

View file

@ -49,6 +49,12 @@
# Create a persistent login so that Alice has a systemd session.
login_as_alice()
# Make sure that Alice has a "nix profile" compatible profile.
if True:
succeed_as_alice("nix profile install nixpkgs#cowsay")
result = succeed_as_alice("cowsay Hello")
machine.log(f"\n{result}")
with subtest("Home Manager installation"):
succeed_as_alice("nix run home-manager -- init --home-manager-url home-manager --nixpkgs-url nixpkgs --switch")