Skip to content

Commit 72ba79c

Browse files
author
Patrick Widmer
committed
feat(wrapperModules.openssh): init
1 parent 3d4986c commit 72ba79c

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
config,
3+
wlib,
4+
lib,
5+
...
6+
}:
7+
{
8+
imports = [ wlib.modules.default ];
9+
10+
options = {
11+
settings = lib.mkOption {
12+
type = lib.types.string;
13+
default = "";
14+
description = ''
15+
OpenSSH client configuration settings.
16+
See `man 5 ssh_config`
17+
'';
18+
example = ''
19+
Host foo
20+
User bar
21+
HostName 192.168.0.2
22+
ProxyJump baz
23+
24+
Host baz
25+
HostName 192.168.0.1
26+
'';
27+
};
28+
};
29+
30+
config = {
31+
package = lib.mkDefault config.pkgs.openssh;
32+
flags = {
33+
"-F" = builtins.toString (config.pkgs.writeText "ssh-config" config.settings);
34+
};
35+
meta = {
36+
maintainers = [ wlib.maintainers.patwid ];
37+
platforms = lib.platforms.unix ++ lib.platforms.windows;
38+
};
39+
};
40+
}

0 commit comments

Comments
 (0)