[Hardware,General,Boot,Packages] Do NOT enable unfree packages by default, enableAllFirmware if unfree packages are enabled

This commit is contained in:
Antoine Viallon 2022-01-25 11:58:52 +01:00
parent 0a5045300e
commit 2a9a326085
Signed by: aviallon
GPG key ID: 186FC35EDEB25716
3 changed files with 5 additions and 3 deletions

View file

@ -23,6 +23,9 @@ let
};
};
cfg = config.aviallon.boot;
allowUnfree = (types.isType types.attrs config.nixpkgs.config)
&& (hasAttr "allowUnfree" config.nixpkgs.config)
&& (getAttr "allowUnfree" config.nixpkgs.config);
in
{
@ -52,7 +55,8 @@ in
config = mkIf cfg.enable {
hardware.enableAllFirmware = mkOverride 500 true;
hardware.enableAllFirmware = allowUnfree;
hardware.enableRedistributableFirmware = true;
boot = {
initrd.kernelModules = [ ];

View file

@ -85,7 +85,6 @@ in
gcc.arch = cfg.cpuArch;
gcc.tune = cfg.cpuTune;
};
nixpkgs.config.allowUnfree = mkDefault true;
nix.buildMachines = [
{

View file

@ -50,7 +50,6 @@ in
};
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; with libsForQt5; [
vim