diff --git a/nix/installer.nix b/nix/installer.nix index 10274f1..8ed8989 100644 --- a/nix/installer.nix +++ b/nix/installer.nix @@ -3,7 +3,10 @@ system.stateVersion = config.system.nixos.version; # use latest kernel we can support to get more hardware support - boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; + boot.kernelPackages = lib.mkDefault (pkgs.zfs.override { + removeLinuxDRM = pkgs.hostPlatform.isAarch64; + }).latestCompatibleLinuxPackages; + boot.zfs.removeLinuxDRM = lib.mkDefault pkgs.hostPlatform.isAarch64; # IPMI SOL console redirection stuff boot.kernelParams = diff --git a/nix/noninteractive.nix b/nix/noninteractive.nix index ad95b58..d775beb 100644 --- a/nix/noninteractive.nix +++ b/nix/noninteractive.nix @@ -50,9 +50,20 @@ "dm-raid" ]; extraModulePackages = [ - config.boot.kernelPackages.zfs + (config.boot.kernelPackages.zfs.override { + inherit (config.boot.zfs) removeLinuxDRM; + }) ]; }; + boot.kernelPatches = lib.optional (config.boot.zfs.removeLinuxDRM && pkgs.stdenv.hostPlatform.system == "aarch64-linux") { + name = "export-neon-symbols-as-gpl"; + patch = pkgs.fetchpatch { + url = "https://github.com/torvalds/linux/commit/aaeca98456431a8d9382ecf48ac4843e252c07b3.patch"; + hash = "sha256-L2g4G1tlWPIi/QRckMuHDcdWBcKpObSWSRTvbHRIwIk="; + revert = true; + }; + }; + networking.hostId = lib.mkDefault "8425e349"; }