Regenerated
This commit is contained in:
+6
-6
@@ -340,20 +340,20 @@ EOF
|
||||
** =generated/modules/users/copy_2_home.nix=
|
||||
This copies stuff to the user home-folder
|
||||
#+BEGIN_SRC nix :tangle generated/modules/users/copy_2_home.nix :noweb tangle :mkdirp yes :eval never-html
|
||||
{ lib, config, pkgs, flakeRoot, ... }:
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
username = config.defaultUser or "henrov";
|
||||
username = config.users.users.defaultUser or "henrov";
|
||||
homeDir = config.home.homeDirectory or "/home/${username}";
|
||||
assetPath = "${flakeRoot}/assets/copy_2_home";
|
||||
assetPath = "${config.flakeRoot}/assets/copy_2_home";
|
||||
in
|
||||
{
|
||||
_module.args.hmUsers = {
|
||||
${username} = {
|
||||
# Make rsync available for the activation script
|
||||
# Ensure rsync is available for the activation script
|
||||
home.packages = [ pkgs.rsync ];
|
||||
|
||||
# Activation script runs after everything else
|
||||
# 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} ..."
|
||||
|
||||
@@ -364,7 +364,7 @@ in
|
||||
|
||||
mkdir -p "${homeDir}"
|
||||
|
||||
# Copy recursively, overwrite existing files, preserve symlinks
|
||||
# Copy recursively, preserve symlinks, overwrite existing files
|
||||
rsync -a --no-owner --no-group "${assetPath}/" "${homeDir}/"
|
||||
|
||||
echo "Done copying assets."
|
||||
|
||||
Reference in New Issue
Block a user