refactored
for 26.05
This commit is contained in:
parent
e92d8e6616
commit
075cb86d40
34 changed files with 435 additions and 345 deletions
|
|
@ -8,33 +8,11 @@
|
|||
...
|
||||
}: {
|
||||
home.activation.HyprlandDots = lib.hm.dag.entryAfter ["linkGeneration"] ''
|
||||
set -euo pipefail
|
||||
umask 022
|
||||
repo=${lib.escapeShellArg hyprlanddots}
|
||||
nvimrepo=${lib.escapeShellArg nvimDots}
|
||||
dmsConfig="${dankMaterialShell}/etc/xdg/quickshell/dms"
|
||||
mkdir -p "${config.xdg.configHome}"
|
||||
copy_dir() {
|
||||
src="$1"; dest="$2"; skip="''${3:-true}"
|
||||
[ -d "$src" ] || return 0
|
||||
[ "$skip" = "true" ] && [ -e "$dest" ] && return 0
|
||||
mkdir -p "$dest"
|
||||
if [ -x ${pkgs.rsync}/bin/rsync ]; then
|
||||
${pkgs.rsync}/bin/rsync -rlD \
|
||||
--chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r \
|
||||
-- "$src"/ "$dest"/
|
||||
else
|
||||
cp -R -P --no-preserve=mode,ownership,timestamps -- "$src"/. "$dest"/
|
||||
fi
|
||||
chmod -R u+rwX "$dest"
|
||||
}
|
||||
copy_dir "$repo/fish" "${config.xdg.configHome}/fish"
|
||||
copy_dir "$repo/hypr" "${config.xdg.configHome}/hypr"
|
||||
copy_dir "$repo/cava" "${config.xdg.configHome}/cava"
|
||||
copy_dir "$nvimrepo" "${config.xdg.configHome}/nvim"
|
||||
copy_dir "$dmsConfig" "${config.xdg.configHome}/quickshell" "false"
|
||||
if [ -f "$repo/starship.toml" ] && [ ! -e "${config.xdg.configHome}/starship.toml" ]; then
|
||||
install -Dm0644 "$repo/starship.toml" "${config.xdg.configHome}/starship.toml"
|
||||
fi
|
||||
${pkgs.rsync}/bin/rsync -rlD --ignore-existing "${hyprlanddots}/fish/" "${config.xdg.configHome}/fish/"
|
||||
${pkgs.rsync}/bin/rsync -rlD --ignore-existing "${hyprlanddots}/hypr/" "${config.xdg.configHome}/hypr/"
|
||||
${pkgs.rsync}/bin/rsync -rlD --ignore-existing "${hyprlanddots}/cava/" "${config.xdg.configHome}/cava/"
|
||||
${pkgs.rsync}/bin/rsync -rlD --ignore-existing "${nvimDots}/" "${config.xdg.configHome}/nvim/"
|
||||
${pkgs.rsync}/bin/rsync -rlD --ignore-existing "${dankMaterialShell}/etc/xdg/quickshell/dms/" "${config.xdg.configHome}/quickshell/"
|
||||
${pkgs.rsync}/bin/rsync -rlD --ignore-existing "${hyprlanddots}/starship.toml" "${config.xdg.configHome}/starship.toml"
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue