Now that my module has been merged upstream! Not that I have anything to use it with for now...
This commit is contained in:
parent
d60e26c617
commit
f3e888dadc
|
@ -29,6 +29,7 @@
|
||||||
./packages
|
./packages
|
||||||
./pager
|
./pager
|
||||||
./power-alert
|
./power-alert
|
||||||
|
./secrets
|
||||||
./ssh
|
./ssh
|
||||||
./terminal
|
./terminal
|
||||||
./tmux
|
./tmux
|
||||||
|
|
25
home/secrets/default.nix
Normal file
25
home/secrets/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{ 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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
10
home/secrets/secrets.nix
Normal file
10
home/secrets/secrets.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# Common secrets
|
||||||
|
let
|
||||||
|
keys = import ../../keys;
|
||||||
|
|
||||||
|
# deadnix: skip
|
||||||
|
all = keys.users;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# Add secrets here
|
||||||
|
}
|
Loading…
Reference in a new issue