From 59e86c9580fbea878dbcec36eee594c03926fc97 Mon Sep 17 00:00:00 2001 From: Alexander Kobjolke Date: Mon, 12 Feb 2024 22:21:31 +0100 Subject: [PATCH] feat(dregil): Enable AppImage binfmt support --- hosts/dregil/configuration.nix | 1 + modules/appimage.nix | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 modules/appimage.nix diff --git a/hosts/dregil/configuration.nix b/hosts/dregil/configuration.nix index d863423..d38e601 100644 --- a/hosts/dregil/configuration.nix +++ b/hosts/dregil/configuration.nix @@ -16,6 +16,7 @@ in { # Include the results of the hardware scan. ./hardware-configuration.nix # + ../../modules/appimage.nix ../../modules/wm/x.nix ../../modules/wm/xmonad/default.nix ]; diff --git a/modules/appimage.nix b/modules/appimage.nix new file mode 100644 index 0000000..782a467 --- /dev/null +++ b/modules/appimage.nix @@ -0,0 +1,12 @@ +{ config, lib, pkgs, ... }: + +{ + boot.binfmt.registrations.appimage = { + wrapInterpreterInShell = false; + interpreter = "${pkgs.appimage-run}/bin/appimage-run"; + recognitionType = "magic"; + offset = 0; + mask = "\\xff\\xff\\xff\\xff\\x00\\x00\\x00\\x00\\xff\\xff\\xff"; + magicOrExtension = "\\x7fELF....AI\\x02"; + }; +}