1
0
Fork 0

fix storage creation in homeassistant on first run

This commit is contained in:
ibizaman 2023-12-09 10:31:51 -08:00 committed by Pierre Penninckx
parent ca2f7039cc
commit da2e1ff0e1

View file

@ -174,10 +174,13 @@ in
}
}
'';
file = "${config.services.home-assistant.configDir}/.storage/onboarding";
storage = "${config.services.home-assistant.configDir}/.storage";
file = "${storage}/onboarding";
in
''
-f ${file} || cp ${onboarding} ${file}
if ! -f ${file}; then
mkdir -p ${storage} && cp ${onboarding} ${file}
fi
'';
sops.secrets."home-assistant" = {