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, ... }: { lib, pkgs, ... }:
let
inherit (lib) mkDefault;
in
{ {
boot = { boot = {
kernelModules = [ "tp_smapi" ]; kernelModules = [ "tp_smapi" ];
extraModulePackages = with config.boot.kernelPackages; [ tp_smapi ]; extraModulePackages = with config.boot.kernelPackages; [ tp_smapi ];
}; };
hardware.trackpoint.enable = mkDefault true; hardware.trackpoint.enable = lib.mkDefault true;
services.tlp.enable = mkDefault true; services.tlp.enable = lib.mkDefault true;
services.xserver.libinput.enable = mkDefault true; services.xserver.libinput.enable = lib.mkDefault true;
} }

View file

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

View file

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

View file

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

View file

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

View file

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