mirror of
https://github.com/NixOS/nixos-hardware
synced 2025-01-11 11:29:46 +01:00
apple/t2: remove tiny-dfr and related options
This commit is contained in:
parent
cceee0a31d
commit
2297628136
3 changed files with 6 additions and 2031 deletions
|
@ -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";
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
1933
apple/t2/pkgs/tiny-dfr/Cargo.lock
generated
1933
apple/t2/pkgs/tiny-dfr/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -1,62 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
|
||||
pkg-config,
|
||||
cairo,
|
||||
gdk-pixbuf,
|
||||
glib,
|
||||
libinput,
|
||||
libxml2,
|
||||
pango,
|
||||
udev,
|
||||
}:
|
||||
let
|
||||
src = fetchFromGitHub {
|
||||
owner = "kekrby";
|
||||
repo = "tiny-dfr";
|
||||
rev = "8a5d413cb1dbe2a25b77a9e7f3cb5b9c88ef3ffb";
|
||||
hash = "sha256-l4D7aePz/CYpkRorrvsgIYrvSzoZl59OGcFGJqqJftk=";
|
||||
};
|
||||
in rustPlatform.buildRustPackage {
|
||||
pname = "tiny-dfr";
|
||||
version = src.rev;
|
||||
|
||||
inherit src;
|
||||
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
udev
|
||||
glib
|
||||
pango
|
||||
cairo
|
||||
gdk-pixbuf
|
||||
libxml2
|
||||
libinput
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/main.rs \
|
||||
--replace-fail "/usr/share/tiny-dfr/" "$out/share/tiny-dfr/"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/etc $out/share
|
||||
|
||||
cp -r etc/udev $out/etc/
|
||||
cp -r share/tiny-dfr $out/share/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "The most basic dynamic function row daemon possible";
|
||||
homepage = "https://github.com/kekrby/tiny-dfr";
|
||||
license = with licenses; [ asl20 bsd3 cc0 isc lgpl21Plus mit mpl20 unicode-dfs-2016 asl20 asl20-llvm mit unlicense ];
|
||||
maintainers = [];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue