1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-23 11:29:42 +01:00

thinkpad: use lib.mkDefault on all unmergable options

This commit is contained in:
Yegor Timoshenko 2017-12-24 01:20:36 +00:00
parent 67cd7af6be
commit fcb9d76ead
No known key found for this signature in database
GPG key ID: C34BF9DCC9DF8210
6 changed files with 13 additions and 17 deletions

View file

@ -1,16 +1,12 @@
{ lib, pkgs, ... }:
let
inherit (lib) mkDefault;
in
{
boot = {
kernelModules = [ "tp_smapi" ];
extraModulePackages = with config.boot.kernelPackages; [ tp_smapi ];
};
hardware.trackpoint.enable = mkDefault true;
services.tlp.enable = mkDefault true;
services.xserver.libinput.enable = mkDefault true;
hardware.trackpoint.enable = lib.mkDefault true;
services.tlp.enable = lib.mkDefault true;
services.xserver.libinput.enable = lib.mkDefault true;
}

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, lib, pkgs, ... }:
{
imports = [ ../. ];
@ -28,7 +28,7 @@
];
};
hardware.cpu.intel.updateMicrocode = true;
hardware.cpu.intel.updateMicrocode = lib.mkDefault true;
systemd.services.tune-powermanagement = {
description = "Tune Powermanagement";

View file

@ -1,10 +1,10 @@
{ config, pkgs, ... }:
{ config, lib, pkgs, ... }:
{
imports = [ ../. ];
boot = {
extraModprobeConfig = ''
extraModprobeConfig = lib.mkDefault ''
options bbswitch use_acpi_to_detect_card_state=1
'';
kernelModules = [ "tpm-rng" ];

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, lib, pkgs, ... }:
{
imports = [
@ -7,8 +7,8 @@
];
# Use the gummiboot efi boot loader. (From default generated configuration.nix)
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.enable = lib.mkDefault true;
boot.loader.efi.canTouchEfiVariables = lib.mkDefault true;
# https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_T460s
kernelAtleast = [

View file

@ -9,7 +9,7 @@
extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
# audio device
extraModprobeConfig = ''
extraModprobeConfig = lib.mkDefault ''
options snd_hda_intel enable=0,1
'';
};

View file

@ -1,10 +1,10 @@
{ config, pkgs, ... }:
{ config, lib, pkgs, ... }:
{
imports = [ ../. ];
# hard disk protection if the laptop falls
services.hdapsd.enable = true;
services.hdapsd.enable = lib.mkDefault true;
# fingerprint reader: login and unlock with fingerprint (if you add one with `fprintd-enroll`)
#services.fprintd.enable = true;