home: create 'modules/home' folder
Consolidating all modules under the same path, to clear out the top-level directory.
This commit is contained in:
parent
c856933803
commit
65a8f7c481
119 changed files with 2 additions and 2 deletions
25
modules/home/secrets/default.nix
Normal file
25
modules/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"
|
||||
];
|
||||
};
|
||||
}
|
||||
BIN
modules/home/secrets/github/token.age
Normal file
BIN
modules/home/secrets/github/token.age
Normal file
Binary file not shown.
9
modules/home/secrets/secrets.nix
Normal file
9
modules/home/secrets/secrets.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Common secrets
|
||||
let
|
||||
keys = import ../../keys;
|
||||
|
||||
all = builtins.attrValues keys.users;
|
||||
in
|
||||
{
|
||||
"github/token.age".publicKeys = all;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue