system: add nix-ld

This commit is contained in:
Leonardo Eugênio 2025-03-19 11:47:36 -03:00
parent 7d15904e7c
commit c51d9ee3f1
No known key found for this signature in database
GPG key ID: 2F8F21CE8721456B
4 changed files with 24 additions and 0 deletions

View file

@ -42,6 +42,7 @@ in
};
my.gaming.enable = true;
my.nix-ld.enable = true;
boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];

View file

@ -17,6 +17,7 @@
./locale.nix
./users.nix
./containers.nix
./nix-ld.nix
./network.nix
../settings
];

21
system/nix-ld.nix Normal file
View file

@ -0,0 +1,21 @@
{
pkgs,
lib,
config,
...
}:
{
options.my.nix-ld.enable = lib.mkEnableOption { };
config = lib.mkIf (config.my.nix-ld.enable) {
programs.nix-ld = {
enable = true;
libraries =
with pkgs;
# run appimages + linux games natively
[ fuse ]
++ (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs)
++ (appimageTools.defaultFhsEnvArgs.targetPkgs pkgs);
};
};
}

View file

@ -1,6 +1,7 @@
{ lib, ... }:
{
options.my = {
nix-ld.enable = lib.mkEnableOption { };
android.enable = lib.mkEnableOption { };
media-packages.enable = lib.mkEnableOption { };
containers.enable = lib.mkEnableOption { };