try fixing templates on home-manager

Update pkgs/sops-install-secrets/main.go
This commit is contained in:
jobs62 2024-11-28 16:38:51 +01:00 committed by Jörg Thalheim
parent 3433ea14fb
commit 8d13626351
3 changed files with 11 additions and 4 deletions

View file

@ -698,7 +698,11 @@ func (app *appContext) validateManifest() error {
// The Nix module only defines placeholders for secrets if there are
// templates.
if len(m.Templates) > 0 {
placeholder := m.PlaceholderBySecretName[secret.Name]
placeholder, present := m.PlaceholderBySecretName[secret.Name]
if !present {
return fmt.Errorf("placeholder for %s not found in manifest", secret.Name)
}
app.secretByPlaceholder[placeholder] = secret
}
}