Skip to content

Commit

Permalink
modules/nixos: add armv7l kernel personality patch
Browse files Browse the repository at this point in the history
  • Loading branch information
zowoq committed Nov 25, 2024
1 parent 25e81d2 commit 82f8166
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
24 changes: 24 additions & 0 deletions modules/nixos/common/armv7l.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{ lib, pkgs, ... }:
# https://github.com/NixOS/aarch64-build-box/pull/133
{
config = lib.mkIf (pkgs.stdenv.hostPlatform.system == "aarch64-linux") {
boot.kernelParams = [ "compat_uts_machine=armv7l" ];

boot.kernelPatches =
let
name = "compat_uts_machine";
in
[
{
inherit name;
patch = pkgs.fetchpatch {
inherit name;
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" ];
};
}
1 change: 1 addition & 0 deletions modules/nixos/common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
../../shared/known-hosts.nix
../../shared/nix-daemon.nix
./agenix.nix
./armv7l.nix
./builder.nix
./security.nix
./sops-nix.nix
Expand Down

0 comments on commit 82f8166

Please sign in to comment.