Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
This commit is contained in:
Harald Hoyer 2025-01-16 04:37:09 +01:00
parent ccc0eda517
commit d86db77250
6 changed files with 44 additions and 10 deletions

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