mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +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;
|
cfg = config.aviallon.boot;
|
||||||
|
allowUnfree = (types.isType types.attrs config.nixpkgs.config)
|
||||||
|
&& (hasAttr "allowUnfree" config.nixpkgs.config)
|
||||||
|
&& (getAttr "allowUnfree" config.nixpkgs.config);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -52,7 +55,8 @@ in
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
hardware.enableAllFirmware = mkOverride 500 true;
|
hardware.enableAllFirmware = allowUnfree;
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd.kernelModules = [ ];
|
initrd.kernelModules = [ ];
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,6 @@ in
|
||||||
gcc.arch = cfg.cpuArch;
|
gcc.arch = cfg.cpuArch;
|
||||||
gcc.tune = cfg.cpuTune;
|
gcc.tune = cfg.cpuTune;
|
||||||
};
|
};
|
||||||
nixpkgs.config.allowUnfree = mkDefault true;
|
|
||||||
|
|
||||||
nix.buildMachines = [
|
nix.buildMachines = [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,6 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; with libsForQt5; [
|
environment.systemPackages = with pkgs; with libsForQt5; [
|
||||||
vim
|
vim
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue