char/flake
nixos flake
git clone https://git.t4t.associates/char/flake
bbd1227
main
1{ pkgs , user-pkgs , ...} : 2{ 3systemd . services . char-dotfiles = { 4description = "Clone and stow charlotte's dotfiles" ; 5wantedBy = [ "multi-user.target" ]; 6after = [ "network-online.target" ]; 7wants = [ "network-online.target" ]; 8serviceConfig = { 9Type = "oneshot" ; 10User = "charlotte" ; 11RemainAfterExit = true ; 12}; 13path = with pkgs ; [ git stow ]; 14script = '' 15set -eu 16cd ~ 17 18mkdir -p .config .local/libexec 19ln -sf ${ user-pkgs . abbr-dir } /bin/abbr-dir ~/.local/libexec/abbr-dir 20 21if [ -d .dotfiles/.git ]; then 22git -C .dotfiles pull --ff-only --recurse-submodules 23else 24git clone --recursive https://github.com/char/dotfiles.git .dotfiles 25fi 26 27for pkg in zsh jj git; do 28[ -d ".dotfiles/ $ pkg " ] && stow -R -d .dotfiles -t ~ " $ pkg " 29done 30'' ; 31}; 32}