mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-06 09:58:47 +08:00
chore: format repo using treefmt-nix and nixfmt-rfc-style
This commit is contained in:
@@ -6,9 +6,18 @@
|
||||
# Backward-compat for 24.05, can be removed after we drop 24.05 support
|
||||
imports = lib.optionals (lib.versionOlder lib.version "24.11pre") [
|
||||
(lib.mkAliasOptionModule [ "hardware" "graphics" "enable" ] [ "hardware" "opengl" "enable" ])
|
||||
(lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages" ] [ "hardware" "opengl" "extraPackages" ])
|
||||
(lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages32" ] [ "hardware" "opengl" "extraPackages32" ])
|
||||
(lib.mkAliasOptionModule [ "hardware" "graphics" "enable32Bit" ] [ "hardware" "opengl" "driSupport32Bit" ])
|
||||
(lib.mkAliasOptionModule
|
||||
[ "hardware" "graphics" "extraPackages" ]
|
||||
[ "hardware" "opengl" "extraPackages" ]
|
||||
)
|
||||
(lib.mkAliasOptionModule
|
||||
[ "hardware" "graphics" "extraPackages32" ]
|
||||
[ "hardware" "opengl" "extraPackages32" ]
|
||||
)
|
||||
(lib.mkAliasOptionModule
|
||||
[ "hardware" "graphics" "enable32Bit" ]
|
||||
[ "hardware" "opengl" "driSupport32Bit" ]
|
||||
)
|
||||
(lib.mkAliasOptionModule [ "hardware" "graphics" "package" ] [ "hardware" "opengl" "package" ])
|
||||
(lib.mkAliasOptionModule [ "hardware" "graphics" "package32" ] [ "hardware" "opengl" "package32" ])
|
||||
];
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
{
|
||||
imports = [ ../. ];
|
||||
# Explicitly set amdgpu support in place of radeon
|
||||
boot.kernelParams = [ "radeon.cik_support=0" "amdgpu.cik_support=1" ];
|
||||
boot.kernelParams = [
|
||||
"radeon.cik_support=0"
|
||||
"amdgpu.cik_support=1"
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
{
|
||||
imports = [ ../. ];
|
||||
# Explicitly set amdgpu support in place of radeon
|
||||
boot.kernelParams = [ "radeon.si_support=0" "amdgpu.si_support=1" ];
|
||||
boot.kernelParams = [
|
||||
"radeon.si_support=0"
|
||||
"amdgpu.si_support=1"
|
||||
];
|
||||
}
|
||||
|
||||
@@ -45,11 +45,15 @@
|
||||
intel-vaapi-driver = (pkgs.intel-vaapi-driver or pkgs.vaapiIntel).override {
|
||||
enableHybridCodec = cfg.enableHybridCodec;
|
||||
};
|
||||
intel-vaapi-driver-32 = (pkgs.driversi686Linux.intel-vaapi-driver or pkgs.driversi686Linux.vaapiIntel).override {
|
||||
enableHybridCodec = cfg.enableHybridCodec;
|
||||
};
|
||||
intel-vaapi-driver-32 =
|
||||
(pkgs.driversi686Linux.intel-vaapi-driver or pkgs.driversi686Linux.vaapiIntel).override
|
||||
{
|
||||
enableHybridCodec = cfg.enableHybridCodec;
|
||||
};
|
||||
|
||||
useIntelOcl = useIntelVaapiDriver && (config.hardware.enableAllFirmware or config.nixpkgs.config.allowUnfree or false);
|
||||
useIntelOcl =
|
||||
useIntelVaapiDriver
|
||||
&& (config.hardware.enableAllFirmware or config.nixpkgs.config.allowUnfree or false);
|
||||
intel-ocl = pkgs.intel-ocl;
|
||||
|
||||
useIntelMediaDriver = cfg.vaapiDriver == "intel-media-driver" || cfg.vaapiDriver == null;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{lib, config, ...}:
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
nvidiaPackage = config.hardware.nvidia.package;
|
||||
in
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{lib, config, ...}:
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
nvidiaPackage = config.hardware.nvidia.package;
|
||||
in
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
blacklist nouveau
|
||||
options nouveau modeset=0
|
||||
'';
|
||||
|
||||
|
||||
services.udev.extraRules = ''
|
||||
# Remove NVIDIA USB xHCI Host Controller devices, if present
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
@@ -22,5 +22,10 @@
|
||||
# Remove NVIDIA VGA/3D controller devices
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
'';
|
||||
boot.blacklistedKernelModules = [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ];
|
||||
boot.blacklistedKernelModules = [
|
||||
"nouveau"
|
||||
"nvidia"
|
||||
"nvidia_drm"
|
||||
"nvidia_modeset"
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{lib, ...}:
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [ ../. ];
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{lib, ...}:
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [ ../. ];
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{lib, ...}:
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [ ../. ];
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
specialisation = lib.mkIf config.hardware.nvidia.primeBatterySaverSpecialisation {
|
||||
battery-saver.configuration = {
|
||||
system.nixos.tags = ["battery-saver"];
|
||||
system.nixos.tags = [ "battery-saver" ];
|
||||
imports = [
|
||||
# Leave only the integrated GPU enabled
|
||||
./disable.nix
|
||||
@@ -28,7 +28,7 @@
|
||||
prime.offload.enable = lib.mkForce false;
|
||||
powerManagement = {
|
||||
enable = lib.mkForce false;
|
||||
finegrained = lib.mkForce false;
|
||||
finegrained = lib.mkForce false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{lib, config, ...}:
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
nvidiaPackage = config.hardware.nvidia.package;
|
||||
in
|
||||
|
||||
Reference in New Issue
Block a user