feat: pre-activate standalone Home Manager environment in VM and Live ISO
This commit is contained in:
@@ -1,6 +1,20 @@
|
||||
{ config, pkgs, inputs, lib, ... }:
|
||||
{ config, pkgs, inputs, lib, homeActivationPackage, ... }:
|
||||
|
||||
{
|
||||
# Pre-activate standalone home-manager for the live environment
|
||||
system.activationScripts.home-manager-activate = {
|
||||
text = ''
|
||||
USER_HOME="/home/nixos"
|
||||
if [ ! -d "$USER_HOME" ]; then
|
||||
mkdir -p "$USER_HOME"
|
||||
chown nixos:users "$USER_HOME"
|
||||
fi
|
||||
# Run activation as the nixos user
|
||||
${pkgs.sudo}/bin/sudo -u nixos ${homeActivationPackage}/activate
|
||||
'';
|
||||
deps = [ "users" ];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
gum
|
||||
|
||||
Reference in New Issue
Block a user