impermanence: link home profile during system activation
This commit is contained in:
parent
2a8206d76c
commit
be54cb5a31
1 changed files with 15 additions and 0 deletions
|
@ -64,4 +64,19 @@ in
|
||||||
];
|
];
|
||||||
users = listToAttrs (map persistUser config.machine.administrators);
|
users = listToAttrs (map persistUser config.machine.administrators);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# link current home manager profile if it exists
|
||||||
|
# impermanence mounts come after system activation during boot
|
||||||
|
# we check the persistent location and link to the expected mount point
|
||||||
|
system.activationScripts.profile-init.text = concatStrings (
|
||||||
|
map (
|
||||||
|
user:
|
||||||
|
with user; # bash
|
||||||
|
''
|
||||||
|
if [[ -d /persist/home/${name}/.local/state/nix/profiles/profile ]]; then
|
||||||
|
ln -sfn /home/${name}/.local/state/nix/profiles/profile /home/${name}/.nix-profile
|
||||||
|
fi
|
||||||
|
''
|
||||||
|
) config.machine.administrators
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue