9 cfg = config.programs.appimage;
13 options.programs.appimage = {
14 enable = lib.mkEnableOption "appimage-run wrapper script for executing appimages on NixOS";
15 binfmt = lib.mkEnableOption "binfmt registration to run appimages via appimage-run seamlessly";
16 package = lib.mkPackageOption pkgs "appimage-run" {
18 pkgs.appimage-run.override {
19 extraPkgs = pkgs: [ pkgs.ffmpeg pkgs.imagemagick ];
25 config = lib.mkIf cfg.enable {
26 boot.binfmt.registrations = lib.mkIf cfg.binfmt (
29 wrapInterpreterInShell = false;
30 interpreter = lib.getExe cfg.package;
31 recognitionType = "magic";
33 mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
37 appimage_type_1 = appimage_common // {
38 magicOrExtension = ''\x7fELF....AI\x01'';
40 appimage_type_2 = appimage_common // {
41 magicOrExtension = ''\x7fELF....AI\x02'';
45 environment.systemPackages = [ cfg.package ];
48 meta.maintainers = with lib.maintainers; [