modules/nixos: add armv7l kernel personality patch

This commit is contained in:
zowoq 2024-06-23 09:31:49 +10:00
parent 073ea012f9
commit 71aee31b9c
2 changed files with 31 additions and 0 deletions
modules/nixos/common

View file

@ -0,0 +1,30 @@
{
config,
lib,
pkgs,
...
}:
# https://github.com/NixOS/aarch64-build-box/pull/133
{
config =
lib.mkIf
(
lib.hasPrefix "build" config.networking.hostName
&& pkgs.stdenv.hostPlatform.system == "aarch64-linux"
)
{
boot.kernelParams = [ "compat_uts_machine=armv7l" ];
boot.kernelPatches = [
{
patch = pkgs.fetchpatch {
name = "compat_uts_machine.patch";
url = "https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy/patch/?id=c1da50fa6eddad313360249cadcd4905ac9f82ea";
hash = "sha256-357+EzMLLt7IINdH0ENE+VcDXwXJMo4qiF/Dorp2Eyw=";
};
}
];
nix.settings.extra-platforms = [ "armv7l-linux" ];
};
}

View file

@ -8,6 +8,7 @@
imports = [
../../shared/known-hosts.nix
../../shared/nix-daemon.nix
./armv7l.nix
./builder.nix
./security.nix
./sops-nix.nix