mirror of
				https://github.com/NixOS/nixos-hardware.git
				synced 2025-11-04 09:17:14 +08:00 
			
		
		
		
	add flake support
This commit is contained in:
		
							
								
								
									
										23
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								README.md
									
									
									
									
									
								
							@@ -20,6 +20,29 @@ imports = [
 | 
			
		||||
];
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Adding via nix flakes support
 | 
			
		||||
 | 
			
		||||
There is also experimental flake support. In your `/etc/nixos/flake.nix` add the following:
 | 
			
		||||
 | 
			
		||||
```nix
 | 
			
		||||
{
 | 
			
		||||
  description = "NixOS configuration with flakes";
 | 
			
		||||
  inputs.nixos-hardware.url = github:NixOS/nixos-hardware/master;
 | 
			
		||||
 | 
			
		||||
  outputs = { self, nixpkgs, nixos-hardware }: {
 | 
			
		||||
    # replace <your-hostname> with your actual hostname
 | 
			
		||||
    nixosConfigurations.<your-hostname> = nixpkgs.lib.nixosSystem {
 | 
			
		||||
      # ...
 | 
			
		||||
      modules = [
 | 
			
		||||
        # ...
 | 
			
		||||
        # add your model from this list: https://github.com/NixOS/nixos-hardware/blob/flakes/flake.nix
 | 
			
		||||
        nixos-hardware.nixosModules.dell-xps-13-9380
 | 
			
		||||
      ];
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## List of Profiles
 | 
			
		||||
 | 
			
		||||
See code for all available configurations.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user