Merge pull request #154 from nix-community/upgrade-aarch64

upgrade zfs on aarch64
This commit is contained in:
Jörg Thalheim 2023-12-23 09:19:36 +01:00 committed by GitHub
commit 1d92ed3028
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 50 additions and 57 deletions

View file

@ -1,8 +1,8 @@
name: update-flake-lock
on:
workflow_dispatch: # allows manual triggering
schedule:
- cron: '0 0 * * 1,4' # Run twice a week
# schedule:
# - cron: '0 0 * * 1,4' # Run twice a week
jobs:
lockfile:

View file

@ -1,30 +1,7 @@
queue_rules:
- name: default
merge_conditions:
- check-success=Evaluate flake.nix
- check-success=check kexec-installer-2311 [x86_64-linux]
- check-success=check kexec-installer-unstable [x86_64-linux]
- check-success=check shellcheck [x86_64-linux]
- check-success=images (nixos-23.11, nscloud-ubuntu-22.04-arm64-4x16)
- check-success=images (nixos-23.11, ubuntu-latest)
- check-success=images (nixos-unstable, nscloud-ubuntu-22.04-arm64-4x16)
- check-success=images (nixos-unstable, ubuntu-latest)
- check-success=package kexec-installer-nixos-2311 [aarch64-linux]
- check-success=package kexec-installer-nixos-2311 [x86_64-linux]
- check-success=package kexec-installer-nixos-2311-noninteractive [aarch64-linux]
- check-success=package kexec-installer-nixos-2311-noninteractive [x86_64-linux]
- check-success=package kexec-installer-nixos-unstable [aarch64-linux]
- check-success=package kexec-installer-nixos-unstable [x86_64-linux]
- check-success=package kexec-installer-nixos-unstable-noninteractive [aarch64-linux]
- check-success=package kexec-installer-nixos-unstable-noninteractive [x86_64-linux]
- check-success=package netboot-installer-nixos-2311 [aarch64-linux]
- check-success=package netboot-installer-nixos-2311 [x86_64-linux]
- check-success=package netboot-installer-nixos-unstable [aarch64-linux]
- check-success=package netboot-installer-nixos-unstable [x86_64-linux]
- check-success=package netboot-nixos-2311 [aarch64-linux]
- check-success=package netboot-nixos-2311 [x86_64-linux]
- check-success=package netboot-nixos-unstable [aarch64-linux]
- check-success=package netboot-nixos-unstable [x86_64-linux]
- check-success=buildbot/nix-eval
defaults:
actions:
queue:

View file

@ -2,11 +2,11 @@
"nodes": {
"nixos-2311": {
"locked": {
"lastModified": 1702128801,
"narHash": "sha256-nU69ZNl1pCXEtNdyHT1/nA4NnXWsWUMpEg937BNecbo=",
"lastModified": 1703242439,
"narHash": "sha256-cPYxhiZkgoZIsKo8l0zaE6PCy7Fv4ekL7YAlaH3J7Ls=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8ae56eaea9054590c57f9509341601f05cbb92d7",
"rev": "df3e6d6131d5f5df9b9524c7f4c39bfce7add927",
"type": "github"
},
"original": {
@ -18,11 +18,11 @@
},
"nixos-unstable": {
"locked": {
"lastModified": 1701893209,
"narHash": "sha256-050hRfYUCfS1Kh72RpuG9fgEtwu6cuHHF3P8iC0BKgY=",
"lastModified": 1703166787,
"narHash": "sha256-OnhZqQdVvhBytYthnjsnQtH/zRn6wR8P4U478lGpktw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e4e2af6d113155799eb9be93e3d8dd32d7300e06",
"rev": "d644f3882d553e717e225e69ec8254d6736b8cba",
"type": "github"
},
"original": {

View file

@ -4,12 +4,8 @@
inputs.nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small";
inputs.nixos-2311.url = "github:NixOS/nixpkgs/release-23.11";
nixConfig.extra-substituters = [
"https://cache.garnix.io"
];
nixConfig.extra-trusted-public-keys = [
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
];
nixConfig.extra-substituters = [ "https://nix-community.cachix.org" ];
nixConfig.extra-trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ];
outputs = { self, nixos-unstable, nixos-2311 }:
let
@ -51,7 +47,11 @@
# TODO: also add a test here once we have https://github.com/NixOS/nixpkgs/pull/228346 merged
netboot-installer = ./nix/netboot-installer/module.nix;
};
checks.x86_64-linux =
checks =
let
# re-export the packages as checks
packages = forAllSystems (system: nixos-unstable.lib.mapAttrs' (n: nixos-unstable.lib.nameValuePair "package-${n}") self.packages.${system});
checks =
let
pkgs = nixos-unstable.legacyPackages.x86_64-linux;
in
@ -70,5 +70,7 @@
kexecTarball = self.packages.x86_64-linux.kexec-installer-nixos-2311-noninteractive;
};
};
in
nixos-unstable.lib.recursiveUpdate packages { x86_64-linux = checks; };
};
}

View file

@ -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 =

View file

@ -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";
}