cli vars password-store: fix file locations
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
lib.mkIf (config.clan.core.vars.settings.secretStore == "password-store")
|
||||
{
|
||||
fileModule = file: {
|
||||
path = lib.mkIf file.config.secret "${config.clan.core.password-store.targetDirectory}/${config.clan.core.machineName}-${file.config.generatorName}-${file.config.name}";
|
||||
path = lib.mkIf file.config.secret "${config.clan.core.vars.settings.secretUploadDirectory}/vars/${file.config.generatorName}/${file.config.name}";
|
||||
};
|
||||
secretUploadDirectory = lib.mkDefault "/etc/secrets";
|
||||
secretModule = "clan_cli.vars.secret_modules.password_store";
|
||||
|
||||
@@ -142,13 +142,7 @@ class SecretStore(SecretStoreBase):
|
||||
for secret_var in self.get_all():
|
||||
if not secret_var.deployed:
|
||||
continue
|
||||
if secret_var.shared:
|
||||
output_file = (
|
||||
output_dir / "shared" / secret_var.generator / secret_var.name
|
||||
)
|
||||
else:
|
||||
output_file = output_dir / secret_var.generator / secret_var.name
|
||||
|
||||
output_file = output_dir / "vars" / secret_var.generator / secret_var.name
|
||||
output_file.parent.mkdir(parents=True, exist_ok=True)
|
||||
with (output_file).open("wb") as f:
|
||||
f.write(
|
||||
|
||||
Reference in New Issue
Block a user