nix-conf/upstream/modules/appimage/default.nix

20 lines
512 B
Nix
Raw Normal View History

2024-02-17 23:33:17 +01:00
{ config, lib, ... }:
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'';
};
};
}