mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 23:11:34 +01:00
29 lines
609 B
Nix
29 lines
609 B
Nix
{
|
|
config,
|
|
self,
|
|
lib,
|
|
...
|
|
}@moduleArgs:
|
|
let
|
|
cfg = config.custom.programs.ssh;
|
|
in
|
|
{
|
|
options.custom.programs.ssh = {
|
|
enable = lib.mkEnableOption "";
|
|
hostName = lib.mkOption {
|
|
type = lib.types.nonEmptyStr;
|
|
default = moduleArgs.osConfig.networking.hostName or "";
|
|
};
|
|
publicKeyPath = lib.mkOption {
|
|
type = lib.types.path;
|
|
default = "${self}/users/${config.home.username}/@${cfg.hostName}/keys/ssh.pub";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf config.custom.programs.ssh.enable {
|
|
programs.ssh = {
|
|
enable = true;
|
|
enableDefaultConfig = false;
|
|
};
|
|
};
|
|
}
|