treewide: apply deadnix and statix

This commit is contained in:
Jörg Thalheim
2022-12-31 11:52:38 +01:00
parent d7dfd13d25
commit 03c6d15152
117 changed files with 93 additions and 162 deletions

View File

@@ -1,6 +1,6 @@
# modification of nixpkgs deviceTree.applyOverlays to resolve https://github.com/NixOS/nixpkgs/issues/125354
# derived from https://github.com/NixOS/nixpkgs/blob/916ca8f2b0c208def051f8ea9760c534a40309db/pkgs/os-specific/linux/device-tree/default.nix
{ lib, pkgs, stdenvNoCC, dtc, libraspberrypi }:
{ lib, stdenvNoCC, dtc, libraspberrypi }:
with lib; (base: overlays': stdenvNoCC.mkDerivation {
name = "device-tree-overlays";

View File

@@ -1,4 +1,3 @@
{ ... }:
{
hardware.deviceTree.overlays = [
{

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
let
cfg = config.hardware.raspberry-pi."4".dwc2;

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
let
cfg = config.hardware.raspberry-pi."4";
@@ -57,7 +57,7 @@ in
overlays = [ (simple-overlay {
target = "i2c0if";
status = "okay";
frequency = cfg.i2c0.frequency;
inherit (cfg.i2c0) frequency;
}) ];
};
})
@@ -67,7 +67,7 @@ in
overlays = [ (simple-overlay {
target = "i2c1";
status = "okay";
frequency = cfg.i2c1.frequency;
inherit (cfg.i2c1) frequency;
}) ];
};
})

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
let
cfg = config.hardware.raspberry-pi."4".fkms-3d;

View File

@@ -1,9 +1,9 @@
{ config, lib, pkgs, modulesPath, ... }:
{ config, lib, ... }:
let
cfg = config.hardware.raspberry-pi."4".apply-overlays-dtmerge;
dt_ao_overlay = (final: prev: {
deviceTree.applyOverlays = (prev.callPackage ./apply-overlays-dtmerge.nix { });
});
dt_ao_overlay = _final: prev: {
deviceTree.applyOverlays = prev.callPackage ./apply-overlays-dtmerge.nix { };
};
in {
options.hardware = {
raspberry-pi."4".apply-overlays-dtmerge = {

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
let
cfg = config.hardware.raspberry-pi."4".poe-hat;

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
let
cfg = config.hardware.raspberry-pi."4".poe-plus-hat;

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
let
cfg = config.hardware.raspberry-pi."4".pwm0;