Skip to content

Commit e1cc1f6

Browse files
soopycmergify[bot]
authored andcommitted
apple/t2: deprecate enableTinyDfr option and conflict with hardware.apple.touchBar
* Adds a deprecation warning to hardware.apple-t2.enableTinyDfr as it has been upstreamed to nixpkgs already. The package and option can be removed at the next release cycle to hopefully not break people's setup. * Adds an assertion to conflict hardware.apple-t2.enableTinyDfr with hardware.apple.touchBar. Having both enabled causes both tiny-dfr to fight for the same display device.
1 parent 912e5b8 commit e1cc1f6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

apple/t2/default.nix

+10
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,16 @@ in
109109
'';
110110
})
111111
(lib.mkIf t2Cfg.enableTinyDfr {
112+
warnings = [
113+
''
114+
hardware.apple-t2.enableTinyDfr is deprecated since the module has been upstreamed as hardware.apple.touchBar.
115+
This option will be removed from the apple/t2 profile when NixOS 24.11 is released.
116+
''
117+
];
118+
assertions = lib.optionals (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.11") [{
119+
assertion = !config.hardware.apple.touchBar.enable;
120+
message = "hardware.apple-t2.enableTinyDfr conflicts with hardware.apple.touchBar.enable. Please disable one of them.";
121+
}];
112122
services.udev.packages = [ tiny-dfrPackage ];
113123

114124
systemd.services.tiny-dfr = {

0 commit comments

Comments
 (0)