Add runners config

This commit is contained in:
ItsDrike 2024-06-10 18:53:04 +02:00
parent 4c775478bc
commit d15842324a
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
2 changed files with 53 additions and 0 deletions

View file

@ -3,5 +3,6 @@
./services ./services
./programs ./programs
./fonts.nix ./fonts.nix
./runners.nix
]; ];
} }

View file

@ -0,0 +1,52 @@
{
config,
pkgs,
lib,
...
}: let
inherit (lib) mkIf;
deviceType = config.myOptions.device.roles.type;
acceptedTypes = ["laptop" "desktop"];
in {
config = mkIf (builtins.elem deviceType acceptedTypes) {
environment.systemPackages = [pkgs.appimage-run];
# run appimages with appimage-run
boot.binfmt.registrations = lib.genAttrs ["appimage" "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";
});
# run unpatched linux binaries with nix-ld
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
stdenv.cc.cc
openssl
curl
glib
util-linux
glibc
icu
libunwind
libuuid
zlib
libsecret
# graphical
freetype
libglvnd
libnotify
SDL2
vulkan-loader
gdk-pixbuf
xorg.libX11
];
};
};
}