chore: format repo using treefmt-nix and nixfmt-rfc-style

This commit is contained in:
Andre
2025-06-04 12:11:03 -04:00
parent fc7c471412
commit 51e51e6014
266 changed files with 3721 additions and 2733 deletions

View File

@@ -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" ])
];

View File

@@ -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"
];
}

View File

@@ -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"
];
}

View File

@@ -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;

View File

@@ -1,4 +1,4 @@
{lib, config, ...}:
{ lib, config, ... }:
let
nvidiaPackage = config.hardware.nvidia.package;
in

View File

@@ -1,4 +1,4 @@
{lib, config, ...}:
{ lib, config, ... }:
let
nvidiaPackage = config.hardware.nvidia.package;
in

View File

@@ -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"
];
}

View File

@@ -1,4 +1,4 @@
{lib, ...}:
{ lib, ... }:
{
imports = [ ../. ];

View File

@@ -1,4 +1,4 @@
{lib, ...}:
{ lib, ... }:
{
imports = [ ../. ];

View File

@@ -1,4 +1,4 @@
{lib, ...}:
{ lib, ... }:
{
imports = [ ../. ];

View File

@@ -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;
};
};
};

View File

@@ -1,4 +1,4 @@
{lib, config, ...}:
{ lib, config, ... }:
let
nvidiaPackage = config.hardware.nvidia.package;
in