Regenerated
This commit is contained in:
+9
-3
@@ -290,21 +290,27 @@ in {
|
||||
** =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";
|
||||
homeDir = config.home.homeDirectory or "/home/${username}";
|
||||
assetPath = "${flakeRoot}/assets/copy_2_home";
|
||||
|
||||
# Use relative path from the module file; Home Manager will expand at activation
|
||||
assetPath = builtins.toString (./../../../assets/copy_2_home);
|
||||
|
||||
in
|
||||
{
|
||||
_module.args.hmUsers = {
|
||||
${username} = {
|
||||
home.activation.copyAssets = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
echo "Copying assets from ${assetPath} to ${homeDir} ..."
|
||||
|
||||
mkdir -p "${homeDir}"
|
||||
# Copy recursively, overwrite existing files, preserve symlinks
|
||||
|
||||
# Recursively copy all files, overwrite existing, preserve symlinks
|
||||
cp -a "${assetPath}/." "${homeDir}/"
|
||||
|
||||
echo "Done copying assets."
|
||||
'';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user