Regenerated

This commit is contained in:
2026-03-22 11:09:20 +00:00
parent 54a139e0d1
commit 4a453f0f41
31 changed files with 1583 additions and 0 deletions
@@ -0,0 +1,32 @@
{ lib, config, pkgs, ... }:
let
username = config.users.users.defaultUser or "henrov";
homeDir = config.home.homeDirectory or "/home/${username}";
assetPath = "${config.flakeRoot}/assets/copy_2_home";
in
{
_module.args.hmUsers = {
${username} = {
# Ensure rsync is available for the activation script
home.packages = [ pkgs.rsync ];
# Activation script: copy assets after all other Home Manager activations
home.activation.copyAssets = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
echo "Copying assets from ${assetPath} to ${homeDir} ..."
if [ ! -d "${assetPath}" ]; then
echo "Error: source directory ${assetPath} does not exist"
exit 1
fi
mkdir -p "${homeDir}"
# Copy recursively, preserve symlinks, overwrite existing files
rsync -a --no-owner --no-group "${assetPath}/" "${homeDir}/"
echo "Done copying assets."
'';
};
};
}
@@ -0,0 +1,26 @@
{ lib, config, pkgs, ... }:
let
username = "henrov";
in
{
# NixOS user
users.users.${username} = {
isNormalUser = true;
home = "/home/${username}";
hashedPassword = "$6$S7iShgBxB.77CwmP$i0njK.2r3OL5UEvgZbmwZ0rnpZ4QyJcv8p9uCmJ4AiVPSMXkQkIwMLzyAOnJ0q8.tPLIp/7EquEIZeK8qbmgw/";
extraGroups = [ "wheel" "networkmanager" ];
};
# Home Manager user definition
_module.args.hmUsers = {
${username} = {
home.username = username;
home.homeDirectory = "/home/${username}";
home.stateVersion = "26.05";
# Example: user packages
home.packages = [ pkgs.git pkgs.vim ];
};
};
}