diff --git a/hosts/argon/configuration.nix b/hosts/argon/configuration.nix index 69e2064..efa6262 100644 --- a/hosts/argon/configuration.nix +++ b/hosts/argon/configuration.nix @@ -2,6 +2,7 @@ { imports = [ + ../../modules/nixos/appimage.nix ../../modules/nixos/astro.nix ../../modules/nixos/audio.nix ../../modules/nixos/bootloader.nix diff --git a/hosts/neon/configuration.nix b/hosts/neon/configuration.nix index 472ac6f..484e4f4 100644 --- a/hosts/neon/configuration.nix +++ b/hosts/neon/configuration.nix @@ -2,6 +2,7 @@ { imports = [ + ../../modules/nixos/appimage.nix ../../modules/nixos/astro.nix ../../modules/nixos/audio.nix ../../modules/nixos/bootloader.nix diff --git a/modules/nixos/appimage.nix b/modules/nixos/appimage.nix new file mode 100644 index 0000000..f466063 --- /dev/null +++ b/modules/nixos/appimage.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ... }: + +{ + # AppImages ship a squashfs payload that the bundled runtime mounts through + # libfuse.so.2 at startup. nix-ld resolves the ELF interpreter but not that + # dlopen, so running one directly dies with "dlopen(): error loading + # libfuse.so.2". appimage-run sidesteps the mount entirely: it unpacks the + # image and runs the payload inside an FHS sandbox, which the bundled Qt and + # electron style binaries need anyway. + # + # Used for the BitBox02 wallet AppImage, downloaded fresh from + # https://bitbox.swiss/download/ rather than installed from nixpkgs. + programs.appimage = { + enable = true; + # register AppImages with binfmt_misc so ./Something.AppImage runs as-is, + # no appimage-run prefix to remember. + binfmt = true; + }; +}