nix-conf/upstream/modules/appimage/default.nix
2024-02-17 23:59:00 +01:00

19 lines
518 B
Nix

{ config, lib, pkgs, ... }:
let cfg = config.programs.appimage;
in {
options.programs.appimage = {
enable = lib.mkEnableOption "Enable AppImage Support";
};
config = lib.mkIf cfg.enable {
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'';
};
};
}