mirror of
https://github.com/nix-community/home-manager
synced 2024-11-13 06:39:44 +01:00
gh: only run migration when required
This commit is contained in:
parent
bf8a128853
commit
28215db303
1 changed files with 1 additions and 1 deletions
|
@ -137,7 +137,7 @@ in {
|
||||||
home.activation.migrateGhAccounts =
|
home.activation.migrateGhAccounts =
|
||||||
let ghHosts = "${config.xdg.configHome}/gh/hosts.yml";
|
let ghHosts = "${config.xdg.configHome}/gh/hosts.yml";
|
||||||
in hm.dag.entryBetween [ "linkGeneration" ] [ "writeBoundary" ] ''
|
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)
|
TMP_DIR=$(mktemp -d)
|
||||||
trap "rm --force --recursive $TMP_DIR" EXIT
|
trap "rm --force --recursive $TMP_DIR" EXIT
|
||||||
|
|
Loading…
Reference in a new issue