nix-config/home/secrets/default.nix
Bruno BELANYI f3e888dadc
All checks were successful
ci/woodpecker/push/check Pipeline was successful
home: add secrets
Now that my module has been merged upstream!

Not that I have anything to use it with for now...
2023-05-12 11:03:49 +00:00

26 lines
606 B
Nix

{ config, inputs, lib, options, ... }:
{
imports = [
inputs.agenix.homeManagerModules.age
];
config.age = {
secrets =
let
toName = lib.removeSuffix ".age";
toSecret = name: { ... }: {
file = ./. + "/${name}";
};
convertSecrets = n: v: lib.nameValuePair (toName n) (toSecret n v);
secrets = import ./secrets.nix;
in
lib.mapAttrs' convertSecrets secrets;
# Add my usual agenix key to the defaults
identityPaths = options.age.identityPaths.default ++ [
"${config.home.homeDirectory}/.ssh/agenix"
];
};
}