Fix unfree predicate by stealing unfreepackages from Majiir

This commit is contained in:
Jimbo 2025-02-25 06:23:59 -05:00
parent 02bc93f444
commit a4ecef2517
8 changed files with 42 additions and 28 deletions

View file

@ -33,9 +33,7 @@
]; ];
}; };
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ nixpkgs.allowUnfreePackages = [ "intel-ocl" ];
"intel-ocl"
];
services.xserver.videoDrivers = [ services.xserver.videoDrivers = [
"intel" "intel"

View file

@ -1,7 +1,7 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./launchers
./emulators ./emulators
./launchers
]; ];
} }

View file

@ -7,7 +7,7 @@
steam-run steam-run
]; ];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ nixpkgs.allowUnfreePackages = [
"steam" "steam"
"steam-unwrapped" "steam-unwrapped"
]; ];

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { lib, pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
dua dua

View file

@ -1,5 +1,10 @@
{ config, lib, pkgs, unstable, ... }: { config, lib, pkgs, unstable, ... }:
{ {
options.nixpkgs.allowUnfreePackages = lib.mkOption {
type = with lib.types; listOf str;
};
config = {
nix = { nix = {
package = lib.mkForce pkgs.nix; package = lib.mkForce pkgs.nix;
settings.experimental-features = [ settings.experimental-features = [
@ -9,8 +14,11 @@
registry.unstable.flake = unstable; registry.unstable.flake = unstable;
}; };
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.nixpkgs.allowUnfreePackages;
_module.args.pkgsUnstable = import unstable { _module.args.pkgsUnstable = import unstable {
inherit (pkgs.stdenv.hostPlatform) system; inherit (pkgs.stdenv.hostPlatform) system;
inherit (config.nixpkgs) config; inherit (config.nixpkgs) config;
}; };
};
} }

View file

@ -16,6 +16,6 @@
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
boot.kernelParams = [ "nvidia_drm.fbdev=1" ]; boot.kernelParams = [ "nvidia_drm.fbdev=1" ];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "nvidia-x11" ]; nixpkgs.allowUnfreePackages = [ "nvidia-x11" ];
}; };
} }

View file

@ -7,8 +7,8 @@
config = lib.mkIf config.system.server.enable { config = lib.mkIf config.system.server.enable {
nixpkgs = { nixpkgs = {
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "minecraft-server" ];
overlays = [ minecraft.overlay ]; overlays = [ minecraft.overlay ];
allowUnfreePackages = [ "minecraft-server" ];
}; };
services.minecraft-servers = { services.minecraft-servers = {

View file

@ -1,7 +1,12 @@
{ config, pkgs, unstable, ... }: { config, lib, pkgs, unstable, ... }:
{ {
imports = [ ./gc ]; imports = [ ./gc ];
options.nixpkgs.allowUnfreePackages = lib.mkOption {
type = with lib.types; listOf str;
};
config = {
nix.settings = { nix.settings = {
experimental-features = [ experimental-features = [
"nix-command" "nix-command"
@ -10,8 +15,11 @@
auto-optimise-store = true; auto-optimise-store = true;
}; };
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.nixpkgs.allowUnfreePackages;
_module.args.pkgsUnstable = import unstable { _module.args.pkgsUnstable = import unstable {
inherit (pkgs.stdenv.hostPlatform) system; inherit (pkgs.stdenv.hostPlatform) system;
inherit (config.nixpkgs) config; inherit (config.nixpkgs) config;
}; };
};
} }