39 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
{ pkgs, ... }:
 | 
						|
{
 | 
						|
  # networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.
 | 
						|
  # Configure network proxy if necessary
 | 
						|
  # networking.proxy.default = "http://user:password@proxy:port/";
 | 
						|
  # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
 | 
						|
  # Enable networking
 | 
						|
  networking.networkmanager.enable = true;
 | 
						|
 | 
						|
  networking.firewall = {
 | 
						|
    enable = true;
 | 
						|
    logRefusedConnections = false;
 | 
						|
  };
 | 
						|
 | 
						|
  # Enable CUPS to print documents.
 | 
						|
  services.printing.enable = true;
 | 
						|
 | 
						|
  security.rtkit.enable = true;
 | 
						|
  services.openssh = {
 | 
						|
    enable = true;
 | 
						|
    ports = [ 9022 ];
 | 
						|
    settings = {
 | 
						|
      PermitRootLogin = "no";
 | 
						|
      PasswordAuthentication = false;
 | 
						|
      KbdInteractiveAuthentication = false;
 | 
						|
    };
 | 
						|
  };
 | 
						|
 | 
						|
  services.fail2ban.enable = true;
 | 
						|
 | 
						|
  # Workaround for nm-wait-online hanging??
 | 
						|
  # Ref: https://github.com/NixOS/nixpkgs/issues/180175
 | 
						|
  systemd.services.NetworkManager-wait-online = {
 | 
						|
    serviceConfig.ExecStart = [
 | 
						|
      ""
 | 
						|
      "${pkgs.networkmanager}/bin/nm-online -q"
 | 
						|
    ];
 | 
						|
  };
 | 
						|
}
 |