Add yadm is dotfiles manager
This commit is contained in:
		
							parent
							
								
									12349398f3
								
							
						
					
					
						commit
						7c11c4352c
					
				
					 19 changed files with 68 additions and 15 deletions
				
			
		
							
								
								
									
										1
									
								
								.bin/.e
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								.bin/.e
									
										
									
									
									
								
							| 
						 | 
					@ -26,6 +26,7 @@ declare -A mapper=(
 | 
				
			||||||
	["wakatime"]="$HOME/.config/wakatime/.wakatime.cfg.tpl"
 | 
						["wakatime"]="$HOME/.config/wakatime/.wakatime.cfg.tpl"
 | 
				
			||||||
	["waybar"]="$HOME/.config/waybar/"
 | 
						["waybar"]="$HOME/.config/waybar/"
 | 
				
			||||||
	["xprofile"]="$HOME/.xprofile"
 | 
						["xprofile"]="$HOME/.xprofile"
 | 
				
			||||||
 | 
						["yadm-encrypt"]="$HOME/.config/yadm/encrypt"
 | 
				
			||||||
	["zsh"]="$HOME/.config/zsh/.zshrc"
 | 
						["zsh"]="$HOME/.config/zsh/.zshrc"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -12,15 +12,10 @@ _autoinstall_base () {
 | 
				
			||||||
	[ ! -x "$(command -v starship)" ] \
 | 
						[ ! -x "$(command -v starship)" ] \
 | 
				
			||||||
		&& curl -sS "https://starship.rs/install.sh" | BIN_DIR="$HOME/.local/bin" FORCE=1 sh
 | 
							&& curl -sS "https://starship.rs/install.sh" | BIN_DIR="$HOME/.local/bin" FORCE=1 sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	_autoinstall_env "$WAKATIME_HOME/.wakatime.cfg"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	_autoinstall_file \
 | 
						_autoinstall_file \
 | 
				
			||||||
		"https://raw.githubusercontent.com/qw3rtman/git-fire/master/git-fire" \
 | 
							"https://raw.githubusercontent.com/qw3rtman/git-fire/master/git-fire" \
 | 
				
			||||||
		"$HOME/.local/bin/git-fire"
 | 
							"$HOME/.local/bin/git-fire"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	hm_config="$HOME/.config/home-manager"
 | 
					 | 
				
			||||||
	ln -sf "$hm_config/$(cat /proc/sys/kernel/hostname)-$(whoami).nix" "$hm_config/home.nix"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return 0
 | 
						return 0
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,5 @@
 | 
				
			||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
alias .f='git --git-dir="$HOME/.dotfiles"'
 | 
					 | 
				
			||||||
alias .hf='git --git-dir="$HOME/.hostfiles"'
 | 
					 | 
				
			||||||
alias :q='exit'
 | 
					alias :q='exit'
 | 
				
			||||||
alias :wq='exit'
 | 
					alias :wq='exit'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,7 +7,6 @@ alias aliases='$EDITOR ~/.config/aliasrc && . ~/.config/aliasrc'
 | 
				
			||||||
alias aliases.local='$EDITOR ~/.config/aliasrc.local && . ~/.config/aliasrc'
 | 
					alias aliases.local='$EDITOR ~/.config/aliasrc.local && . ~/.config/aliasrc'
 | 
				
			||||||
# shellcheck disable=2154
 | 
					# shellcheck disable=2154
 | 
				
			||||||
alias arch-deps2deps='set -a; source PKGBUILD; set +a; paru -S --asdeps --noconfirm $depends && paru -Ui --rebuild'
 | 
					alias arch-deps2deps='set -a; source PKGBUILD; set +a; paru -S --asdeps --noconfirm $depends && paru -Ui --rebuild'
 | 
				
			||||||
alias artisan='./artisan'
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
alias bspwm-default='echo "default" > /tmp/bspwm_mode; bspc wm -r'
 | 
					alias bspwm-default='echo "default" > /tmp/bspwm_mode; bspc wm -r'
 | 
				
			||||||
alias bspwm-present='echo "presenter" > /tmp/bspwm_mode; bspc wm -r'
 | 
					alias bspwm-present='echo "presenter" > /tmp/bspwm_mode; bspc wm -r'
 | 
				
			||||||
| 
						 | 
					@ -85,4 +82,6 @@ alias xdebug='XDEBUG_CONFIG="remote_host=127.0.0.1 remote_port=9003"'
 | 
				
			||||||
[ -x "$(command -v rmtrash)" ] && alias rm='rmtrash -I --one-file-system -v'
 | 
					[ -x "$(command -v rmtrash)" ] && alias rm='rmtrash -I --one-file-system -v'
 | 
				
			||||||
[ -x "$(command -v rmdirtrash)" ] && alias rmdir='rmdirtrash'
 | 
					[ -x "$(command -v rmdirtrash)" ] && alias rmdir='rmdirtrash'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[ -x "$(command -v yadm)" ] || alias yadm='git --git-dir="$HOME/.local/share/yadm/repo.git"'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[ -f "$HOME/.config/aliasrc.local" ] && . "$HOME/.config/aliasrc.local"
 | 
					[ -f "$HOME/.config/aliasrc.local" ] && . "$HOME/.config/aliasrc.local"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,2 +1,4 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export ANSIBLE_VAULT_PASSWORD_FILE="$HOME/.bin/ansible-vault-pass.sh"
 | 
					export ANSIBLE_VAULT_PASSWORD_FILE="$HOME/.bin/ansible-vault-pass.sh"
 | 
				
			||||||
export ANSIBLE_PYTHON_INTERPRETER='auto_silent'
 | 
					export ANSIBLE_PYTHON_INTERPRETER='auto_silent'
 | 
				
			||||||
							
								
								
									
										18
									
								
								.config/env.d/20-flatpak
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								.config/env.d/20-flatpak
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,18 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ -n "$XDG_DATA_HOME" ] && [ -d "$XDG_DATA_HOME/flatpak/exports/bin" ]; then
 | 
				
			||||||
 | 
						export PATH="$XDG_DATA_HOME/flatpak/exports/bin:$PATH"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ -d /var/lib/flatpak/exports/bin ]; then
 | 
				
			||||||
 | 
						export PATH="/var/lib/flatpak/exports/bin:$PATH"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ -n "$XDG_DATA_HOME" ] && [ -d "$XDG_DATA_HOME/flatpak/exports/share" ]; then
 | 
				
			||||||
 | 
						export XDG_DATA_DIRS="$XDG_DATA_HOME/flatpak/exports/share:$XDG_DATA_DIRS"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ -d "/var/lib/flatpak/exports/share" ]; then
 | 
				
			||||||
 | 
						export XDG_DATA_DIRS="/var/lib/flatpak/exports/share:$XDG_DATA_DIRS"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
#/usr/bin/env sh
 | 
					#!/usr/bin/env sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# shellcheck disable=2089
 | 
					# shellcheck disable=2089
 | 
				
			||||||
[ -x "$(command -v bat)" ] && export MANPAGER="sh -c 'col -bx | bat -l man -p'"
 | 
					[ -x "$(command -v bat)" ] && export MANPAGER="sh -c 'col -bx | bat -l man -p'"
 | 
				
			||||||
							
								
								
									
										6
									
								
								.config/env.d/99-local##hostname.portalo
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.config/env.d/99-local##hostname.portalo
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,6 @@
 | 
				
			||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export AUTOSTART_DISPLAY="Hyprland"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export MONITOR_PRIMARY="DisplayPort-0"
 | 
				
			||||||
 | 
					export MONITOR_SECONDARY="HDMI-A-0"
 | 
				
			||||||
| 
						 | 
					@ -45,8 +45,13 @@ export TIME_STYLE="long-iso"
 | 
				
			||||||
export VIMINIT="if has('nvim') | source $XDG_CONFIG_HOME/nvim/init.lua | else | source $XDG_CONFIG_HOME/vim/vimrc | endif"
 | 
					export VIMINIT="if has('nvim') | source $XDG_CONFIG_HOME/nvim/init.lua | else | source $XDG_CONFIG_HOME/vim/vimrc | endif"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
for profile in "$XDG_CONFIG_HOME/environment.d/"*; do
 | 
					for additional_env in "$XDG_CONFIG_HOME/env.d/"*; do
 | 
				
			||||||
 | 
						# check for ## in name to ignore yadm files
 | 
				
			||||||
 | 
						case "$additional_env" in
 | 
				
			||||||
 | 
							*##*) continue ;;
 | 
				
			||||||
 | 
						esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	# shellcheck disable=1090
 | 
						# shellcheck disable=1090
 | 
				
			||||||
    test -r "$profile" && . "$profile"
 | 
					    test -r "$additional_env" && . "$additional_env"
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
unset profile
 | 
					unset additional_env
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										2
									
								
								.config/environment.d/.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.config/environment.d/.gitignore
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -1,2 +0,0 @@
 | 
				
			||||||
10-home-manager.conf
 | 
					 | 
				
			||||||
99-local
 | 
					 | 
				
			||||||
							
								
								
									
										11
									
								
								.config/home-manager/audio.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								.config/home-manager/audio.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,11 @@
 | 
				
			||||||
 | 
					{ config, pkgs, ... }:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						home.packages = with pkgs; [
 | 
				
			||||||
 | 
							#pipewire # audio server
 | 
				
			||||||
 | 
							playerctl # control media players
 | 
				
			||||||
 | 
							(spotifyd.override { withMpris = true; }) # spotify-daemon
 | 
				
			||||||
 | 
							#wireplumber # pipewire session manager
 | 
				
			||||||
 | 
							helvum # pipewire GUI
 | 
				
			||||||
 | 
						];
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -31,6 +31,7 @@
 | 
				
			||||||
		unzip # unzip
 | 
							unzip # unzip
 | 
				
			||||||
		vimHugeX # vim with clipboard support
 | 
							vimHugeX # vim with clipboard support
 | 
				
			||||||
		xdg-user-dirs # tool manage user directories
 | 
							xdg-user-dirs # tool manage user directories
 | 
				
			||||||
 | 
							yadm # dotfile manager
 | 
				
			||||||
		yq # tool for YAML
 | 
							yq # tool for YAML
 | 
				
			||||||
		yt-dlp # tool to download videos from the internet
 | 
							yt-dlp # tool to download videos from the internet
 | 
				
			||||||
		zip # zip
 | 
							zip # zip
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										15
									
								
								.config/home-manager/fonts.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								.config/home-manager/fonts.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,15 @@
 | 
				
			||||||
 | 
					{ config, pkgs, ... }:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						fonts.fontconfig.enable = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						home.packages = with pkgs; [
 | 
				
			||||||
 | 
							dejavu_fonts
 | 
				
			||||||
 | 
							freefont_ttf
 | 
				
			||||||
 | 
							liberation_ttf
 | 
				
			||||||
 | 
							(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
 | 
				
			||||||
 | 
							noto-fonts
 | 
				
			||||||
 | 
							roboto
 | 
				
			||||||
 | 
							twitter-color-emoji
 | 
				
			||||||
 | 
						];
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -9,6 +9,6 @@ exclude =
 | 
				
			||||||
    ^MERGE_MSG$
 | 
					    ^MERGE_MSG$
 | 
				
			||||||
    ^TAG_EDITMSG$
 | 
					    ^TAG_EDITMSG$
 | 
				
			||||||
exclude_unknown_project = true
 | 
					exclude_unknown_project = true
 | 
				
			||||||
api_key = ${WAKATIME_API_KEY}
 | 
					api_key = {{ env.WAKATIME_API_KEY }}
 | 
				
			||||||
[projectmap]
 | 
					[projectmap]
 | 
				
			||||||
projects/emgauwa/core = emgauwa-core
 | 
					projects/emgauwa/core = emgauwa-core
 | 
				
			||||||
							
								
								
									
										2
									
								
								.config/yadm/config
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								.config/yadm/config
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,2 @@
 | 
				
			||||||
 | 
					[yadm]
 | 
				
			||||||
 | 
						gpg-recipient = tobias@msrg.cc
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								.local/share/yadm/archive
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.local/share/yadm/archive
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue