mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Hardware,General,Boot,Packages] Do NOT enable unfree packages by default, enableAllFirmware if unfree packages are enabled
This commit is contained in:
parent
0a5045300e
commit
2a9a326085
3 changed files with 5 additions and 3 deletions
6
boot.nix
6
boot.nix
|
|
@ -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 = [ ];
|
||||
|
|
|
|||
|
|
@ -85,7 +85,6 @@ in
|
|||
gcc.arch = cfg.cpuArch;
|
||||
gcc.tune = cfg.cpuTune;
|
||||
};
|
||||
nixpkgs.config.allowUnfree = mkDefault true;
|
||||
|
||||
nix.buildMachines = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.systemPackages = with pkgs; with libsForQt5; [
|
||||
vim
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue