summaryrefslogtreecommitdiffstats
path: root/lenovo/thinkpad
diff options
context:
space:
mode:
authorYegor Timoshenko <yegortimoshenko@gmail.com>2017-12-24 01:20:36 +0000
committerYegor Timoshenko <yegortimoshenko@gmail.com>2017-12-24 01:20:36 +0000
commitfcb9d76ead20fe9ff7cbed64e88672166e48d355 (patch)
tree45bedfd88703b2f1346091b47180eca26a123368 /lenovo/thinkpad
parent67cd7af6be9cc4ece9622e2f6db2f211ff261f0e (diff)
thinkpad: use lib.mkDefault on all unmergable options
Diffstat (limited to 'lenovo/thinkpad')
-rw-r--r--lenovo/thinkpad/default.nix10
-rw-r--r--lenovo/thinkpad/t410/default.nix4
-rw-r--r--lenovo/thinkpad/t440p/default.nix4
-rw-r--r--lenovo/thinkpad/t460s/default.nix6
-rw-r--r--lenovo/thinkpad/x140e/default.nix2
-rw-r--r--lenovo/thinkpad/x220/default.nix4
6 files changed, 13 insertions, 17 deletions
diff --git a/lenovo/thinkpad/default.nix b/lenovo/thinkpad/default.nix
index e51a575..aba9596 100644
--- a/lenovo/thinkpad/default.nix
+++ b/lenovo/thinkpad/default.nix
@@ -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;
}
diff --git a/lenovo/thinkpad/t410/default.nix b/lenovo/thinkpad/t410/default.nix
index 3dbc4e5..b7a765d 100644
--- a/lenovo/thinkpad/t410/default.nix
+++ b/lenovo/thinkpad/t410/default.nix
@@ -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";
diff --git a/lenovo/thinkpad/t440p/default.nix b/lenovo/thinkpad/t440p/default.nix
index 262638a..ddf6bd8 100644
--- a/lenovo/thinkpad/t440p/default.nix
+++ b/lenovo/thinkpad/t440p/default.nix
@@ -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" ];
diff --git a/lenovo/thinkpad/t460s/default.nix b/lenovo/thinkpad/t460s/default.nix
index 3e51709..039b6a4 100644
--- a/lenovo/thinkpad/t460s/default.nix
+++ b/lenovo/thinkpad/t460s/default.nix
@@ -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 = [
diff --git a/lenovo/thinkpad/x140e/default.nix b/lenovo/thinkpad/x140e/default.nix
index 38f3460..31b0bb3 100644
--- a/lenovo/thinkpad/x140e/default.nix
+++ b/lenovo/thinkpad/x140e/default.nix
@@ -9,7 +9,7 @@
extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
# audio device
- extraModprobeConfig = ''
+ extraModprobeConfig = lib.mkDefault ''
options snd_hda_intel enable=0,1
'';
};
diff --git a/lenovo/thinkpad/x220/default.nix b/lenovo/thinkpad/x220/default.nix
index 81fec06..285d13e 100644
--- a/lenovo/thinkpad/x220/default.nix
+++ b/lenovo/thinkpad/x220/default.nix
@@ -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;