mirror of
				https://github.com/NixOS/nixos-hardware.git
				synced 2025-11-04 09:17:14 +08:00 
			
		
		
		
	Tidy-up
This commit is contained in:
		@@ -9,7 +9,7 @@ in {
 | 
			
		||||
    ./firmware/surface-go/ath10k
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  microsoft-surface.kernel-version = mkDefault "5.19.17";
 | 
			
		||||
  microsoft-surface.kernelVersion = mkDefault "5.19.17";
 | 
			
		||||
 | 
			
		||||
  boot.extraModprobeConfig = mkDefault ''
 | 
			
		||||
    options i915 enable_fbc=1 enable_rc6=1 modeset=1
 | 
			
		||||
 
 | 
			
		||||
@@ -8,9 +8,8 @@ in {
 | 
			
		||||
    ./linux-5.19.17
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  options.microsoft-surface.kernel-version = mkOption {
 | 
			
		||||
  options.microsoft-surface.kernelVersion = mkOption {
 | 
			
		||||
    description = "Kernel Version to use (patched for MS Surface)";
 | 
			
		||||
    type = types.enum [  ];
 | 
			
		||||
    # default = "5.19.17";
 | 
			
		||||
    type = types.enum [ ];
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@ let
 | 
			
		||||
 | 
			
		||||
  inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage repos;
 | 
			
		||||
 | 
			
		||||
  cfg = config.microsoft-surface.kernel-version;
 | 
			
		||||
  cfg = config.microsoft-surface;
 | 
			
		||||
 | 
			
		||||
  version = "5.19.17";
 | 
			
		||||
  extraMeta.branch = "5.19";
 | 
			
		||||
@@ -25,11 +25,11 @@ let
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
in {
 | 
			
		||||
  options.microsoft-surface.kernel-version = mkOption {
 | 
			
		||||
  options.microsoft-surface.kernelVersion = mkOption {
 | 
			
		||||
    type = types.enum [ "5.19.17" ];
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  config = mkIf (cfg == "5.19.17") {
 | 
			
		||||
  config = mkIf (cfg.kernelVersion == "5.19.17") {
 | 
			
		||||
    boot = {
 | 
			
		||||
      inherit kernelPackages;
 | 
			
		||||
    };
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user