Script for coying copyy_stuff is made inline

This commit is contained in:
2026-03-03 07:15:01 +01:00
parent a6bfd07819
commit e42281f232
+11 -7
View File
@@ -2909,20 +2909,24 @@ This makes sure all ./assets/copy_stuff ends up in the right folder
#+begin_src nix :tangle home/copy_stuff.nix :noweb tangle :mkdirp yes.
{ config, pkgs, lib, flakeRoot, ... }:
{
home.packages = [ pkgs.bash ];
home.activation.recreateConfig = {
text = ''
#!${pkgs.bash}/bin/bash
set -euo pipefail
echo "Running post-activation script..."
"${flakeRoot}/assets/scripts/recreate_config.sh"
SOURCE_DIR="${flakeRoot}/assets/copy_stuff"
DEST_DIR="$HOME"
if [ ! -d "$SOURCE_DIR" ]; then
echo "Error: Source directory $SOURCE_DIR does not exist."
exit 1
fi
mkdir -p "$DEST_DIR"
rsync -av --no-group --no-owner --delete "$SOURCE_DIR/" "$DEST_DIR/"
echo "Config files copied from $SOURCE_DIR to $DEST_DIR. Symlinks replaced with editable files."
hyprctl reload
'';
deps = [ pkgs.bash ];
deps = [ pkgs.bash pkgs.rsync ];
};
}
#+end_src
* README Utils