fix: update secrets approach to match 'nix-secrets'
This commit is contained in:
@@ -4,13 +4,21 @@
|
||||
pkgs,
|
||||
myUtils,
|
||||
osConfig ? null,
|
||||
inputs ? null,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
sops = myUtils.sopsAvailability config osConfig;
|
||||
standalone = osConfig == null;
|
||||
in
|
||||
{
|
||||
lib.optionalAttrs standalone {
|
||||
sops.secrets = myUtils.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" "anki" [
|
||||
"sync-user"
|
||||
"sync-key"
|
||||
] { };
|
||||
}
|
||||
// {
|
||||
warnings = lib.optional (
|
||||
!sops.available && config.programs.anki.enable
|
||||
) "anki is enabled but sops secrets are not available. anki sync will not be configured.";
|
||||
@@ -24,8 +32,8 @@ in
|
||||
review-heatmap
|
||||
];
|
||||
profiles."User 1".sync = lib.mkIf sops.available {
|
||||
usernameFile = "${sops.secrets."anki-sync-user".path}";
|
||||
keyFile = "${sops.secrets."anki-sync-key".path}";
|
||||
usernameFile = "${sops.secrets."anki/sync-user".path}";
|
||||
keyFile = "${sops.secrets."anki/sync-key".path}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user