mirror of
				https://github.com/ItsDrike/nixdots
				synced 2025-11-04 01:56:35 +00:00 
			
		
		
		
	Originally, I was including all role configurations for all hosts, and controlling which get applied in the role configs with a check in each file. This is a very repetetive and annoying approach. Instead, now the role directory is included manually from the hosts config for devices which meet that role, removing the role options.
		
			
				
	
	
		
			11 lines
		
	
	
	
		
			240 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
	
		
			240 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{lib, ...}: let
 | 
						|
  inherit (lib) mkOption;
 | 
						|
in {
 | 
						|
  options.myOptions.device.roles = {
 | 
						|
    virtual-machine = mkOption {
 | 
						|
      type = lib.types.bool;
 | 
						|
      default = false;
 | 
						|
      description = "Is this system a virtual machine?";
 | 
						|
    };
 | 
						|
  };
 | 
						|
}
 |