From db63ed890f7342ea0c0a434b47830cbf8b973b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 12 Dec 2023 11:10:33 +0100 Subject: [PATCH 1/6] upgrade zfs on aarch64 --- nix/installer.nix | 5 ++++- nix/noninteractive.nix | 13 ++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) 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"; } From 6da561b62fa2b0bb79f470280fa34a4d04f26067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 12 Dec 2023 11:21:11 +0100 Subject: [PATCH 2/6] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'nixos-2311': 'github:NixOS/nixpkgs/8ae56eaea9054590c57f9509341601f05cbb92d7' (2023-12-09) → 'github:NixOS/nixpkgs/cf28ee258fd5f9a52de6b9865cdb93a1f96d09b7' (2023-12-12) • Updated input 'nixos-unstable': 'github:NixOS/nixpkgs/e4e2af6d113155799eb9be93e3d8dd32d7300e06' (2023-12-06) → 'github:NixOS/nixpkgs/120a26f8ce32ac2bdc0e49a9fed830b7446416b4' (2023-12-11) --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 6dd29fd..81d4a64 100644 --- a/flake.lock +++ b/flake.lock @@ -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": { From 1717912538eae13bf2519ba9234d14044275eec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 22 Dec 2023 12:04:10 +0100 Subject: [PATCH 3/6] mergify: upgrade for buildbot --- .mergify.yml | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index 43647be..9a4bd8d 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -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: From 3b7b5998f11a8c388a49d3af45849cacc7bf6f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 22 Dec 2023 12:47:54 +0100 Subject: [PATCH 4/6] export packages as checks --- flake.nix | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/flake.nix b/flake.nix index 2909642..81e1ce2 100644 --- a/flake.nix +++ b/flake.nix @@ -51,24 +51,30 @@ # 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 - pkgs = nixos-unstable.legacyPackages.x86_64-linux; - in - { - kexec-installer-unstable = pkgs.callPackage ./nix/kexec-installer/test.nix { - kexecTarball = self.packages.x86_64-linux.kexec-installer-nixos-unstable-noninteractive; - }; - shellcheck = pkgs.runCommand "shellcheck" + # 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 { - nativeBuildInputs = [ pkgs.shellcheck ]; - } '' - shellcheck ${(pkgs.nixos [self.nixosModules.kexec-installer]).config.system.build.kexecRun} - touch $out - ''; - kexec-installer-2311 = nixos-2311.legacyPackages.x86_64-linux.callPackage ./nix/kexec-installer/test.nix { - kexecTarball = self.packages.x86_64-linux.kexec-installer-nixos-2311-noninteractive; - }; - }; + kexec-installer-unstable = pkgs.callPackage ./nix/kexec-installer/test.nix { + kexecTarball = self.packages.x86_64-linux.kexec-installer-nixos-unstable-noninteractive; + }; + shellcheck = pkgs.runCommand "shellcheck" + { + nativeBuildInputs = [ pkgs.shellcheck ]; + } '' + shellcheck ${(pkgs.nixos [self.nixosModules.kexec-installer]).config.system.build.kexecRun} + touch $out + ''; + kexec-installer-2311 = nixos-2311.legacyPackages.x86_64-linux.callPackage ./nix/kexec-installer/test.nix { + kexecTarball = self.packages.x86_64-linux.kexec-installer-nixos-2311-noninteractive; + }; + }; + in + nixos-unstable.lib.recursiveUpdate packages { x86_64-linux = checks; }; }; } From d7dfa237d697e87aa5284b6a8ff4e073d422a3cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 22 Dec 2023 15:02:04 +0100 Subject: [PATCH 5/6] switch out binary cache --- flake.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 81e1ce2..351c240 100644 --- a/flake.nix +++ b/flake.nix @@ -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 From 3a769c86e244144c7ef8b163f807c8c0d0b429a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 23 Dec 2023 09:19:00 +0100 Subject: [PATCH 6/6] disable flake updates for now --- .github/workflows/update-flake-lock.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-flake-lock.yml b/.github/workflows/update-flake-lock.yml index 3cc52e6..6a3e060 100644 --- a/.github/workflows/update-flake-lock.yml +++ b/.github/workflows/update-flake-lock.yml @@ -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: