initial switch to hyprland
This commit is contained in:
parent
1daf9cf44b
commit
6c8c5c43d4
41 changed files with 562 additions and 501 deletions
41
home-manager/init.nix
Normal file
41
home-manager/init.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
hyprlanddots,
|
||||
nvimDotfiles,
|
||||
...
|
||||
}: {
|
||||
home.activation.HyprlandDots = lib.hm.dag.entryAfter ["linkGeneration"] ''
|
||||
set -euo pipefail
|
||||
umask 022
|
||||
repo=${lib.escapeShellArg hyprlanddots}
|
||||
nvimrepo=${lib.escapeShellArg nvimDotfiles}
|
||||
mkdir -p "${config.xdg.configHome}"
|
||||
copy_dir() {
|
||||
src="$1"; dest="$2"
|
||||
[ -d "$src" ] || return 0
|
||||
[ -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/quickshell" "${config.xdg.configHome}/quickshell"
|
||||
copy_dir "$repo/waybar" "${config.xdg.configHome}/waybar"
|
||||
copy_dir "$repo/cava" "${config.xdg.configHome}/cava"
|
||||
copy_dir "$nvimrepo" "${config.xdg.configHome}/nvim"
|
||||
|
||||
if [ -f "$repo/starship.toml" ] && [ ! -e "${config.xdg.configHome}/starship.toml" ]; then
|
||||
install -Dm0644 "$repo/starship.toml" "${config.xdg.configHome}/starship.toml"
|
||||
fi
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue