36 lines
		
	
	
		
			615 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			615 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{
 | 
						|
  lib,
 | 
						|
  config,
 | 
						|
  ...
 | 
						|
}:
 | 
						|
let
 | 
						|
  cfg = config.nix-config.networking;
 | 
						|
in
 | 
						|
{
 | 
						|
 | 
						|
  options = {
 | 
						|
    nix-config.networking.hostName = lib.mkOption {
 | 
						|
      type = lib.types.str;
 | 
						|
      default = "nixos";
 | 
						|
      };
 | 
						|
  };
 | 
						|
 | 
						|
  config = {
 | 
						|
    networking.hostName = cfg.hostName;
 | 
						|
 | 
						|
    networking.networkmanager.enable = true;
 | 
						|
    networking.networkmanager.wifi.powersave = lib.mkDefault true;
 | 
						|
    users.users.${config.nix-config.userName}.extraGroups = [
 | 
						|
      "networkmanager"
 | 
						|
    ];
 | 
						|
    services.avahi.enable = true;
 | 
						|
    services.avahi.openFirewall = true;
 | 
						|
 | 
						|
    # networking.firewall = {
 | 
						|
    #   enable = false;
 | 
						|
    # };
 | 
						|
 | 
						|
  };
 | 
						|
 | 
						|
}
 |