fix(nixos): read navidrome secrets from pikachu
This commit is contained in:
@@ -7,6 +7,7 @@ let
|
||||
cfg = config.guests.navidrome;
|
||||
envFile = "/run/secrets/navidrome.env";
|
||||
hasLastfmSecrets = cfg.lastfmApiKeySecret != null && cfg.lastfmSecretSecret != null;
|
||||
hostSecrets = ../secrets + "/${config.networking.hostName}.yaml";
|
||||
in
|
||||
{
|
||||
options.guests.navidrome = {
|
||||
@@ -122,8 +123,8 @@ in
|
||||
};
|
||||
|
||||
sops.secrets = lib.optionalAttrs hasLastfmSecrets {
|
||||
${cfg.lastfmApiKeySecret} = { };
|
||||
${cfg.lastfmSecretSecret} = { };
|
||||
${cfg.lastfmApiKeySecret}.sopsFile = hostSecrets;
|
||||
${cfg.lastfmSecretSecret}.sopsFile = hostSecrets;
|
||||
};
|
||||
|
||||
sops.templates."navidrome.env" = lib.mkIf hasLastfmSecrets {
|
||||
|
||||
Reference in New Issue
Block a user