blob: 7b3908580d94d43b9c7d32733e3dfc427b0cf547 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
{
config,
lib,
pkgs,
...
}:
let
inherit ((import ../lib.nix { inherit lib pkgs; })) mkScriptModule;
gitPlatformKeys = [
"github"
"gitlab"
"bitbucket"
"codeberg"
"srht"
];
gopassKeys =
lib.optionals config.development.git.useSSH gitPlatformKeys ++ config.security.ssh.extraGopassKeys;
base = mkScriptModule {
name = "gopass-ssh-load";
path = ./script.sh;
description = "Load SSH keys from gopass password store";
env = {
GNUPGHOME = config.home.sessionVariables.GNUPGHOME;
GOPASS_SSH_KEYS = lib.concatStringsSep " " gopassKeys;
};
deps = with pkgs; [
config.security.gopass.package
gnupg
openssh
bash
];
inherit config;
};
in
{
options = base.options;
config = base.moduleConfig;
}
|