mirror of
https://github.com/ItsDrike/nixdots
synced 2024-12-25 18:54:34 +00:00
Add runners config
This commit is contained in:
parent
4c775478bc
commit
d15842324a
|
@ -3,5 +3,6 @@
|
|||
./services
|
||||
./programs
|
||||
./fonts.nix
|
||||
./runners.nix
|
||||
];
|
||||
}
|
||||
|
|
52
system/roles/workstation/runners.nix
Normal file
52
system/roles/workstation/runners.nix
Normal 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
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in a new issue