fix nixpkgs rev for t2pkgs
This commit is contained in:
parent
80d7e8489d
commit
a65c2d24a7
8 changed files with 116 additions and 73 deletions
|
|
@ -1,34 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.nixos-hardware.nixosModules.apple-t2
|
||||
];
|
||||
|
||||
nix.settings = {
|
||||
trusted-substituters = [
|
||||
"https://t2linux.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"t2linux.cachix.org-1:P733c5Gt1qTcxsm+Bae0renWnT8OLs0u9+yfaK2Bejw="
|
||||
];
|
||||
};
|
||||
|
||||
apple.touchBar.enable = true;
|
||||
|
||||
# REF: https://github.com/NixOS/nixos-hardware/blob/master/apple/t2/default.nix
|
||||
apple-t2 = {
|
||||
# the macbook does not have an AMD dGPU (iGPU)
|
||||
enableIGPU = false;
|
||||
|
||||
kernelChannel = "stable";
|
||||
|
||||
firmware = {
|
||||
enable = true;
|
||||
version = "sonoma";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
57
hosts/modules/core/t2-firmware/default.nix
Normal file
57
hosts/modules/core/t2-firmware/default.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
# REF: https://github.com/t2linux/nixos-t2-iso
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
t2pkgs,
|
||||
...
|
||||
} @ args: {
|
||||
imports = [
|
||||
(import inputs.nixos-hardware.nixosModules.apple-t2 (args // {pkgs = t2pkgs;}))
|
||||
];
|
||||
|
||||
nix.settings = {
|
||||
trusted-substituters = [
|
||||
"https://t2linux.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"t2linux.cachix.org-1:P733c5Gt1qTcxsm+Bae0renWnT8OLs0u9+yfaK2Bejw="
|
||||
];
|
||||
};
|
||||
|
||||
# cerulean channels configuration
|
||||
nixpkgs.channels.t2pkgs = {
|
||||
source = inputs.nixpkgs-t2-firmware;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowBroken = false;
|
||||
};
|
||||
overlays = [
|
||||
(self: super: {
|
||||
get-apple-firmware = super.callPackage ./get-apple-firmware.nix {};
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
# environment.systemPackages = with base; [
|
||||
# python3
|
||||
# dmg2img
|
||||
# get-apple-firmware
|
||||
# ];
|
||||
|
||||
# hardware = {
|
||||
# apple.touchBar.enable = true;
|
||||
|
||||
# # REF: https://github.com/NixOS/nixos-hardware/blob/master/apple/t2/default.nix
|
||||
# apple-t2 = {
|
||||
# # the macbook does not have an AMD dGPU (iGPU)
|
||||
# enableIGPU = false;
|
||||
|
||||
# kernelChannel = "stable";
|
||||
|
||||
# firmware = {
|
||||
# enable = true;
|
||||
# version = "sonoma";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
}
|
||||
29
hosts/modules/core/t2-firmware/get-apple-firmware.nix
Normal file
29
hosts/modules/core/t2-firmware/get-apple-firmware.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
stdenvNoCC,
|
||||
fetchurl,
|
||||
lib,
|
||||
}:
|
||||
stdenvNoCC.mkDerivation (final: {
|
||||
pname = "get-apple-firmware";
|
||||
version = "360156db52c013dbdac0ef9d6e2cebbca46b955b";
|
||||
src = fetchurl {
|
||||
url = "https://raw.github.com/t2linux/wiki/${final.version}/docs/tools/firmware.sh";
|
||||
hash = "sha256-IL7omNdXROG402N2K9JfweretTnQujY67wKKC8JgxBo=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp ${final.src} $out/bin/get-apple-firmware
|
||||
chmod +x $out/bin/get-apple-firmware
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A script to get needed firmware for T2linux devices";
|
||||
homepage = "https://t2linux.org";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [soopyc];
|
||||
mainProgram = "get-apple-firmware";
|
||||
};
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue