2024-01-27 14:47:45 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
2024-02-11 16:54:31 +01:00
|
|
|
pkgs,
|
2024-01-27 14:47:45 +01:00
|
|
|
...
|
2024-05-07 18:20:52 +02:00
|
|
|
}:
|
|
|
|
let
|
2024-02-11 16:54:31 +01:00
|
|
|
inherit (pkgs.stdenv) isDarwin;
|
2024-05-07 18:20:52 +02:00
|
|
|
in
|
|
|
|
{
|
2024-01-27 14:47:45 +01:00
|
|
|
age = {
|
2024-05-07 18:20:52 +02:00
|
|
|
identityPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
|
2024-01-27 14:47:45 +01:00
|
|
|
|
2024-05-07 18:20:52 +02:00
|
|
|
secrets =
|
|
|
|
with builtins;
|
|
|
|
listToAttrs (
|
|
|
|
map (k: {
|
|
|
|
name = lib.removePrefix "home/secrets/" (lib.removeSuffix ".age" k);
|
|
|
|
value = {
|
|
|
|
file = ./../.. + "/${k}";
|
|
|
|
};
|
|
|
|
}) (attrNames (import ./secrets.nix))
|
|
|
|
);
|
2024-01-27 14:47:45 +01:00
|
|
|
|
2024-02-11 16:54:31 +01:00
|
|
|
secretsDir = lib.mkIf isDarwin "/private/tmp/agenix";
|
|
|
|
secretsMountPoint = lib.mkIf isDarwin "/private/tmp/agenix.d";
|
2024-01-27 14:47:45 +01:00
|
|
|
};
|
|
|
|
}
|