mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
gh: test for existence of hosts file
Having the module enabled but never using gh will result in the config file existing but no hosts.yml. In that scenario we won't have anything to migrate, so only test for hosts.yml.
This commit is contained in:
parent
d1d950841d
commit
2939d49036
1 changed files with 1 additions and 1 deletions
|
@ -136,7 +136,7 @@ in {
|
||||||
# See https://github.com/nix-community/home-manager/issues/4744 for details.
|
# See https://github.com/nix-community/home-manager/issues/4744 for details.
|
||||||
home.activation.migrateGhAccounts =
|
home.activation.migrateGhAccounts =
|
||||||
hm.dag.entryBetween [ "linkGeneration" ] [ "writeBoundary" ] ''
|
hm.dag.entryBetween [ "linkGeneration" ] [ "writeBoundary" ] ''
|
||||||
if [[ -e "${config.xdg.configHome}/gh/config.yml" ]]; then
|
if [[ -e "${config.xdg.configHome}/gh/hosts.yml" ]]; 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