dotfiles/home/secrets/default.nix

22 lines
519 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
...
}: let
inherit (pkgs.stdenv) isDarwin;
in {
2024-01-27 14:47:45 +01:00
age = {
identityPaths = ["${config.home.homeDirectory}/.ssh/id_ed25519"];
secrets = with builtins;
listToAttrs (map (k: {
name = lib.removePrefix "home/secrets/" (lib.removeSuffix ".age" k);
value = {file = ./../.. + "/${k}";};
}) (attrNames (import ./secrets.nix)));
secretsDir = lib.mkIf isDarwin "/private/tmp/agenix";
secretsMountPoint = lib.mkIf isDarwin "/private/tmp/agenix.d";
2024-01-27 14:47:45 +01:00
};
}