mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-08 19:08:49 +08:00
apple/t2: remove tiny-dfr and related options
This commit is contained in:
committed by
mergify[bot]
parent
cceee0a31d
commit
2297628136
@@ -24,8 +24,6 @@ let
|
||||
|
||||
pipewirePackage = overrideAudioFiles pkgs.pipewire "spa/plugins/";
|
||||
|
||||
tiny-dfrPackage = pkgs.callPackage ./pkgs/tiny-dfr { };
|
||||
|
||||
apple-set-os-loader-installer = pkgs.stdenv.mkDerivation {
|
||||
name = "apple-set-os-loader-installer-1.0";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
@@ -49,18 +47,18 @@ let
|
||||
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(lib.mkRemovedOptionModule ["hardware" "apple-t2" "enableTinyDfr"] ''
|
||||
The hardware.apple-t2.enableTinyDfr option was deprecated and removed since upstream Nixpkgs now has an identical module.
|
||||
Please migrate to hardware.apple.touchBar.
|
||||
'')
|
||||
];
|
||||
options.hardware.apple-t2 = {
|
||||
enableAppleSetOsLoader = lib.mkOption {
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
description = "Whether to enable the appleSetOsLoader activation script.";
|
||||
};
|
||||
|
||||
enableTinyDfr = lib.mkOption {
|
||||
default = true;
|
||||
type = lib.types.bool;
|
||||
description = "Whether to enable the tiny-dfr touchbar service.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
@@ -108,33 +106,5 @@ in
|
||||
options apple-gmux force_igd=y
|
||||
'';
|
||||
})
|
||||
(lib.mkIf t2Cfg.enableTinyDfr {
|
||||
warnings = [
|
||||
''
|
||||
hardware.apple-t2.enableTinyDfr is deprecated since the module has been upstreamed as hardware.apple.touchBar.
|
||||
This option will be removed from the apple/t2 profile when NixOS 24.11 is released.
|
||||
''
|
||||
];
|
||||
assertions = lib.optionals (lib.versionAtLeast (lib.versions.majorMinor lib.version) "24.11") [{
|
||||
assertion = !config.hardware.apple.touchBar.enable;
|
||||
message = "hardware.apple-t2.enableTinyDfr conflicts with hardware.apple.touchBar.enable. Please disable one of them.";
|
||||
}];
|
||||
services.udev.packages = [ tiny-dfrPackage ];
|
||||
|
||||
systemd.services.tiny-dfr = {
|
||||
enable = true;
|
||||
description = "Tiny Apple silicon touch bar daemon";
|
||||
after = [ "systemd-user-sessions.service" "getty@tty1.service" "plymouth-quit.service" "systemd-logind.service" ];
|
||||
bindsTo = [ "dev-tiny_dfr_display.device" "dev-tiny_dfr_backlight.device" ];
|
||||
startLimitIntervalSec = 30;
|
||||
startLimitBurst = 2;
|
||||
script = "${tiny-dfrPackage}/bin/tiny-dfr";
|
||||
restartTriggers = [ tiny-dfrPackage ];
|
||||
};
|
||||
|
||||
environment.etc."tiny-dfr/config.toml" = {
|
||||
source = "${tiny-dfrPackage}/share/tiny-dfr/config.toml";
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user