nixcfg/modules/darwin/security/ssh/default.nix
Harald Hoyer d86db77250 ssh
Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
2025-01-16 04:38:17 +01:00

34 lines
642 B
Nix

{
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;
};
};
}