diff --git a/modules/programs/gh.nix b/modules/programs/gh.nix index bdd939de..192762a2 100644 --- a/modules/programs/gh.nix +++ b/modules/programs/gh.nix @@ -137,7 +137,7 @@ in { home.activation.migrateGhAccounts = let ghHosts = "${config.xdg.configHome}/gh/hosts.yml"; in hm.dag.entryBetween [ "linkGeneration" ] [ "writeBoundary" ] '' - if [[ ! -L "${ghHosts}" && -f "${ghHosts}" ]]; then + if [[ ! -L "${ghHosts}" && -f "${ghHosts}" && $(grep --invert-match --quiet '^version:' ${ghHosts}) ]]; then ( TMP_DIR=$(mktemp -d) trap "rm --force --recursive $TMP_DIR" EXIT