From f0dddc14867bcfe19dc4461ad9fc116750b73349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Thu, 25 Aug 2022 16:13:36 +0200 Subject: [PATCH] Fix lookup of users/groups in dry activation This fails otherwise as the users snippet was not executed and the user/group does not exist. Closes #222 --- pkgs/sops-install-secrets/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/sops-install-secrets/main.go b/pkgs/sops-install-secrets/main.go index a25145a..7b23c3e 100644 --- a/pkgs/sops-install-secrets/main.go +++ b/pkgs/sops-install-secrets/main.go @@ -455,7 +455,7 @@ func (app *appContext) validateSecret(secret *secret) error { } secret.mode = os.FileMode(mode) - if app.ignorePasswd { + if app.ignorePasswd || os.Getenv("NIXOS_ACTION") == "dry-activate" { secret.owner = 0 secret.group = 0 } else if app.checkMode == Off {