handle /run/secrets more gracefully if its a directory

This commit is contained in:
Jörg Thalheim 2025-01-10 10:42:54 +01:00 committed by Jörg Thalheim
parent 74b9fe5d7f
commit f214c1b76c
2 changed files with 30 additions and 25 deletions

View file

@ -170,6 +170,9 @@ in
boot.initrd.postDeviceCommands = ''
cp -r ${testAssets + "/age-keys.txt"} /run/age-keys.txt
chmod -R 700 /run/age-keys.txt
# if the directory exists, sops-nix should replace it with a symlink
mkdir /run/secrets
'';
};