dotfiles/nix/home-manager/modules/ssh/default.nix
Magic_RB 76513487e9
Streamline SSH emacs forwarding
Signed-off-by: Magic_RB <magic_rb@redalder.org>
2021-08-19 18:24:38 +02:00

21 lines
412 B
Nix

{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.magic_rb.programs.ssh;
in
{
options.magic_rb.programs.ssh = {
enable = mkEnableOption "Enable ssh_config";
};
config = mkIf cfg.enable {
home.file = {
".ssh/config".source = ./config;
};
home.activation."ssh-controlmasters" = config.lib.dag.entryAfter ["writeBoundary"] ''
mkdir -p ~/.ssh/controlmasters
'';
};
}