dotfiles/home/secrets/default.nix

29 lines
573 B
Nix
Raw Normal View History

2024-01-27 14:47:45 +01:00
{
config,
lib,
pkgs,
2024-01-27 14:47:45 +01:00
...
2024-05-07 18:20:52 +02:00
}:
let
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
secretsDir = lib.mkIf isDarwin "/private/tmp/agenix";
secretsMountPoint = lib.mkIf isDarwin "/private/tmp/agenix.d";
2024-01-27 14:47:45 +01:00
};
}