forked from UniverseBow/flake
add t2-firmware support
This commit is contained in:
parent
1b7b1e66f0
commit
468f399965
8 changed files with 75 additions and 6 deletions
16
flake.lock
generated
16
flake.lock
generated
|
|
@ -978,6 +978,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1774465523,
|
||||
"narHash": "sha256-4v7HPm63Q90nNn4fgkgKsjW1AH2Klw7XzPtHJr562nM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "de895be946ad1d8aafa0bb6dfc7e7e0e9e466a29",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1767313136,
|
||||
|
|
@ -1144,6 +1159,7 @@
|
|||
"nix-flatpak": "nix-flatpak",
|
||||
"nixcats": "nixcats",
|
||||
"nixcord": "nixcord",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-master": "nixpkgs-master",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
|
||||
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-25.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
|
|||
|
|
@ -3,10 +3,6 @@
|
|||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../../hosts/modules/core/garbage-collector.nix
|
||||
];
|
||||
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,13 @@
|
|||
# WARNING: for that you need to use `services.ssh-agent.enable`
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
forwardAgent = false;
|
||||
addKeysToAgent = "yes";
|
||||
|
||||
matchBlocks = {
|
||||
# * block indicates defaults
|
||||
"*" = {
|
||||
forwardAgent = false;
|
||||
addKeysToAgent = "yes";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
}: {
|
||||
imports = [
|
||||
./hardware.nix
|
||||
../modules/core/t2-firmware.nix
|
||||
];
|
||||
|
||||
networking.hostName = "MACBOOKI9";
|
||||
|
|
|
|||
17
hosts/modules/core/t2-firmware.nix
Normal file
17
hosts/modules/core/t2-firmware.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.nixos-hardware.nixosModules.apple-t2
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# t2-firmware dependencies
|
||||
# REF: https://github.com/t2linux/nixos-t2-iso
|
||||
python3
|
||||
dmg2img
|
||||
get-apple-firmware
|
||||
];
|
||||
}
|
||||
|
|
@ -24,6 +24,8 @@
|
|||
];
|
||||
};
|
||||
|
||||
get-apple-firmware = pkgs.callPackage ../packages/get-apple-firmware.nix {};
|
||||
|
||||
sddm-theme-corners = import ../packages/sddm-theme/corners.nix {
|
||||
inherit pkgs;
|
||||
};
|
||||
|
|
|
|||
29
packages/get-apple-firmware.nix
Normal file
29
packages/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