mirror of
https://github.com/sstent/vmimages.git
synced 2026-01-25 22:51:49 +00:00
addin ssh key
This commit is contained in:
@@ -1,20 +1,22 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
with lib;
|
||||
|
||||
let cfg = config.custom.sshd;
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.sshd;
|
||||
in {
|
||||
|
||||
#define option to enable this
|
||||
#define option to enable this
|
||||
options.custom.sshd.enable = mkEnableOption "Enable SSH";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
permitRootLogin = "no";
|
||||
passwordAuthentication = false;
|
||||
};
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
permitRootLogin = "no";
|
||||
passwordAuthentication = false;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
|
||||
};
|
||||
}
|
||||
networking.firewall.allowedTCPPorts = [22];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user