Skip to content

Commit

Permalink
change path on secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
jdonszelmann committed Jan 1, 2024
1 parent 9f75b01 commit b7eaa69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion modules/sops/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ let
};
path = mkOption {
type = types.str;
default = if config.neededForUsers then "/run/secrets-for-users/${config.name}" else "/run/secrets/${config.name}";
default = if config.neededForUsers then "/run/secrets-for-users/${config.name}" else "${cfg.symlinkPath}/${config.name}";
defaultText = "/run/secrets-for-users/$name when neededForUsers is set, /run/secrets/$name when otherwise.";
description = ''
Path where secrets are symlinked to.
If the default is kept no symlink is created.
If cfg.symlinkPath is set, /run/secrets will become that path
'';
};
format = mkOption {
Expand Down
1 change: 0 additions & 1 deletion pkgs/sops-install-secrets/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ func symlinkSecret(targetFile string, secret *secret, userMode bool) error {

func symlinkSecrets(targetDir string, secrets []secret, userMode bool) error {
for _, secret := range secrets {
fmt.Errorf("target dir: %s", targetDir);
targetFile := filepath.Join(targetDir, secret.Name)
if targetFile == secret.Path {
continue
Expand Down

0 comments on commit b7eaa69

Please sign in to comment.