home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 2b91b235f3a56802c03b7895f08470326c1e4d31
parent dafed4325b0c006b6cf6c72834a7c5ea5376b5c6
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Thu, 17 Dec 2020 09:38:31 +0100

systems: add s390x and ppc64le to naruhodo and wakasu

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Msystems/hosts/naruhodo.nix | 12++++++++++++
Msystems/hosts/wakasu.nix | 10++++++++++
2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/systems/hosts/naruhodo.nix b/systems/hosts/naruhodo.nix @@ -11,6 +11,8 @@ let endpointIP = strings.optionalString secretCondition (import secretPath).wg.endpointIP; endpointPort = if secretCondition then (import secretPath).wg.listenPort else 0; endpointPublicKey = strings.optionalString secretCondition (import secretPath).wireguard.kerkouane.publicKey; + + getEmulator = system: (lib.systems.elaborate { inherit system; }).emulator pkgs; in { imports = [ @@ -59,10 +61,20 @@ in extraModprobeConfig = '' options v4l2loopback exclusive_caps=1 ''; + binfmt.registrations = { + s390x-linux = { + # interpreter = getEmulator "s390x-linux"; + interpreter = "${pkgs.qemu}/bin/qemu-s390x"; + magicOrExtension = ''\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16''; + mask = ''\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff''; + }; + }; binfmt.emulatedSystems = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" + # "s390x-linux" + "powerpc64le-linux" ]; }; diff --git a/systems/hosts/wakasu.nix b/systems/hosts/wakasu.nix @@ -45,10 +45,20 @@ in }; }; */ + boot.binfmt.registrations = { + s390x-linux = { + # interpreter = getEmulator "s390x-linux"; + interpreter = "${pkgs.qemu}/bin/qemu-s390x"; + magicOrExtension = ''\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16''; + mask = ''\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff''; + }; + }; boot.binfmt.emulatedSystems = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" + # "s390x-linux" + "powerpc64le-linux" ]; users.extraUsers.builder = {