ssh
Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
This commit is contained in:
parent
ccc0eda517
commit
d86db77250
6 changed files with 44 additions and 10 deletions
33
modules/darwin/security/ssh/default.nix
Normal file
33
modules/darwin/security/ssh/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) types mkEnableOption mkIf;
|
||||
inherit (lib.metacfg) mkOpt;
|
||||
|
||||
cfg = config.metacfg.security.ssh;
|
||||
in
|
||||
{
|
||||
options.metacfg.security.ssh = {
|
||||
enable = mkEnableOption "SSH";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ openssh ];
|
||||
launchd.user.agents.ssh-agent.serviceConfig = {
|
||||
EnvironmentVariables.SSH_AUTH_SOCK = "/Users/harald/.ssh/ssh-agent.sock";
|
||||
ProgramArguments = [
|
||||
"${pkgs.openssh}/bin/ssh-agent"
|
||||
"-s"
|
||||
"-D"
|
||||
];
|
||||
RunAtLoad = true;
|
||||
#KeepAlive.SuccessfulExit = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue