mirror of
				https://github.com/nmasur/dotfiles
				synced 2025-11-04 12:53:15 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			431 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			431 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
# SSHD settings for AWS machines
 | 
						|
 | 
						|
{
 | 
						|
  config,
 | 
						|
  lib,
 | 
						|
  ...
 | 
						|
}:
 | 
						|
 | 
						|
let
 | 
						|
  cfg = config.nmasur.presets.services.openssh-aws;
 | 
						|
in
 | 
						|
{
 | 
						|
 | 
						|
  options.nmasur.presets.services.openssh-aws = {
 | 
						|
    enable = lib.mkEnableOption "OpenSSH on AWS VMs";
 | 
						|
  };
 | 
						|
 | 
						|
  config = lib.mkIf cfg.enable {
 | 
						|
    services.openssh = {
 | 
						|
      settings = {
 | 
						|
        # AWS settings require this
 | 
						|
        PermitRootLogin = lib.mkForce "prohibit-password";
 | 
						|
      };
 | 
						|
    };
 | 
						|
 | 
						|
  };
 | 
						|
}
 |