improv: componentize ssh

nix-rearch
pegasust 2022-12-10 18:55:34 -07:00
parent ca42be3f5f
commit ad01a1fd65
3 changed files with 22 additions and 6 deletions

View File

View File

@ -1 +1,22 @@
{} { config
, proj_root
, myLib
, ...
}:
let cfg = config.base.ssh;
in
{
options.base.ssh.enable = myLib.mkOption {
type = myLib.types.bool;
default = true;
example = false;
description = ''
Enables SSH
'';
};
config.programs.ssh = {
inherit (cfg) enable;
forwardAgent = true;
extraConfig = builtins.readFile "${proj_root}/ssh/config";
};
}

View File

@ -139,9 +139,4 @@ in
}; };
initExtra = myHome.shellInitExtra or ""; initExtra = myHome.shellInitExtra or "";
}; };
programs.ssh = {
enable = true;
forwardAgent = true;
extraConfig = builtins.readFile "${proj_root}/ssh/config";
};
} }