Fix age key generation and test it

This commit is contained in:
Janne Heß 2021-09-30 15:28:39 +02:00
parent 5db02f2939
commit 4cebc08062
No known key found for this signature in database
GPG key ID: 69165158F05265DF
2 changed files with 6 additions and 1 deletions

View file

@ -212,7 +212,7 @@ in {
'';
system.activationScripts.generate-age-key = (mkIf cfg.age.generateKey) (stringAfter [] ''
if [[ ! -f "${cfg.age.keyFile}" ]]; then;
if [[ ! -f '${cfg.age.keyFile}' ]]; then
echo generating machine-specific age key...
mkdir -p $(dirname ${cfg.age.keyFile})
# age-keygen sets 0600 by default, no need to chmod.