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
This commit is contained in:
Janne Heß 2022-08-25 16:13:36 +02:00
parent 6068774a8e
commit f0dddc1486
No known key found for this signature in database
GPG key ID: 69165158F05265DF

View file

@ -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 {