Script for coying copyy_stuff is made inline
This commit is contained in:
+11
-7
@@ -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.
|
#+begin_src nix :tangle home/copy_stuff.nix :noweb tangle :mkdirp yes.
|
||||||
{ config, pkgs, lib, flakeRoot, ... }:
|
{ config, pkgs, lib, flakeRoot, ... }:
|
||||||
{
|
{
|
||||||
home.packages = [ pkgs.bash ];
|
|
||||||
home.activation.recreateConfig = {
|
home.activation.recreateConfig = {
|
||||||
text = ''
|
text = ''
|
||||||
#!${pkgs.bash}/bin/bash
|
#!${pkgs.bash}/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
echo "Running post-activation script..."
|
SOURCE_DIR="${flakeRoot}/assets/copy_stuff"
|
||||||
"${flakeRoot}/assets/scripts/recreate_config.sh"
|
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
|
#+end_src
|
||||||
|
|
||||||
* README Utils
|
* README Utils
|
||||||
|
|||||||
Reference in New Issue
Block a user