nixos,anti-feature: deny non-source packages

This commit is contained in:
Guanran Wang 2023-11-15 08:05:44 +08:00
parent 15db5b9348
commit 95b1b92b4b
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8
4 changed files with 37 additions and 26 deletions

View file

@ -0,0 +1,36 @@
{lib, ...}: {
nixpkgs.config = {
allowBroken = false;
allowUnsupportedSystem = false;
allowNonSource = false;
allowNonSourcePredicate = pkg:
builtins.elem (lib.getName pkg) [
"vscodium"
"spotify"
"adoptopenjdk-hotspot-bin"
"osu-lazer-bin-2023.1026.0"
"protonup-qt-2.8.2"
"cef-binary"
"virtualbox"
"virtualbox-modules"
"open-watcom-bin"
"open-watcom-bin-unwrapped"
"sof-firmware"
];
allowUnfree = false;
allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"nvidia-x11"
#"nvidia-settings"
#"nvidia-persistenced"
#"xow_dongle-firmware"
#"facetimehd-firmware"
"osu-lazer-bin-2023.1026.0"
"spotify"
"steam"
"steam-original"
];
};
}

View file

@ -4,6 +4,6 @@
# TODO: should this be considered user-specific?
./overlays
./unfree
./anti-feature.nix
];
}

View file

@ -1,5 +0,0 @@
{...}: {
imports = [
./unfree.nix
];
}

View file

@ -1,20 +0,0 @@
{lib, ...}: {
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"nvidia-x11" # ../hardware/gpu/nvidia.nix
#"nvidia-settings"
#"nvidia-persistenced"
"xow_dongle-firmware" # ../hardware/accessories/xbox.nix
"facetimehd-firmware" # ../hardware/hardwares/imac-2017.nix
"osu-lazer-bin-2023.1026.0" # what?
"spotify"
"steam"
"steam-original"
#"discord"
#"google-chrome"
#"lunar-client"
#"microsoft-edge-stable"
#"qq"
];
}