mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 03:30:45 +00:00
nixos/amd-microcode: remove with lib;
This commit is contained in:
parent
6db0587bdb
commit
4d24986578
|
@ -1,16 +1,11 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
hardware.cpu.amd.updateMicrocode = mkOption {
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Update the CPU microcode for AMD processors.
|
||||
'';
|
||||
|
@ -18,12 +13,10 @@ with lib;
|
|||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.hardware.cpu.amd.updateMicrocode {
|
||||
config = lib.mkIf config.hardware.cpu.amd.updateMicrocode {
|
||||
# Microcode updates must be the first item prepended in the initrd
|
||||
boot.initrd.prepend = mkOrder 1 [ "${pkgs.microcodeAmd}/amd-ucode.img" ];
|
||||
boot.initrd.prepend = lib.mkOrder 1 [ "${pkgs.microcodeAmd}/amd-ucode.img" ];
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue