update_all: system_update home_update sync_configs

format_home:
    nixfmt ~/.config/home-manager

format_system:
    doas nixfmt /etc/nixos

system_update:
    nh os boot -u /etc/nixos

home_update:
    rm -fr ~/.gtkrc-2.0
    nh home switch -u ~/.config/home-manager -- --impure

sync_configs: format_home format_system
    rsync -a --delete /etc/nixos/ ~/projects/configs/dotfiles/etcnixos/
    rsync -a --delete ~/.config/home-manager/ ~/projects/configs/dotfiles/home-manager/

