commit a67021417e7334dc2e8fc772cca7ba9b49421c34
parent b283bd693a74b6a078a14b19a40298a29cbcb697
Author: Vincent Demeester <vincent@sbr.pm>
Date: Thu, 28 May 2020 10:52:09 +0200
nix: add nixos-hardware and update hardware/*
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
7 files changed, 28 insertions(+), 19 deletions(-)
diff --git a/hardware/lenovo-p50.nix b/hardware/lenovo-p50.nix
@@ -13,6 +13,7 @@
intelBusId = "PCI:0:2:0";
};
};
+ services.throttled.enable = lib.mkDefault true;
services = {
tlp = {
extraConfig = ''
diff --git a/hardware/thinkpad-t460s.nix b/hardware/thinkpad-t460s.nix
@@ -1,7 +1,11 @@
{ config, pkgs, ... }:
{
- imports = [ ./thinkpad.nix ];
+ imports = [
+ <nixos-hardware/lenovo/thinkpad/t460s>
+ <nixos-hardware/ssd>
+ ./thinkpad.nix
+ ];
services = {
tlp = {
extraConfig = ''
diff --git a/hardware/thinkpad-x220.nix b/hardware/thinkpad-x220.nix
@@ -1,7 +1,11 @@
{ config, pkgs, ... }:
{
- imports = [ ./thinkpad.nix ];
+ imports = [
+ <nixos-hardware/lenovo/thinkpad/x220>
+ <nixos-hardware/ssd>
+ ./thinkpad.nix
+ ];
boot = {
kernelParams = [ "i915.enable_psr=1" ];
extraModprobeConfig = ''
diff --git a/hardware/thinkpad.nix b/hardware/thinkpad.nix
@@ -1,6 +1,7 @@
{ config, pkgs, ... }:
{
+ imports [ <nixos-hardware/lenovo/thinkpad> ];
boot = {
blacklistedKernelModules = [
# Kernel GPU Savings Options (NOTE i915 chipset only)
@@ -27,30 +28,13 @@
];
loader.efi.canTouchEfiVariables = true;
};
- environment.systemPackages = with pkgs; [
- linuxPackages.tp_smapi
- ];
hardware = {
trackpoint.enable = false;
cpu.intel.updateMicrocode = true;
- opengl = {
- #enable = true;
- extraPackages = [ pkgs.vaapiIntel ];
- #driSupport32Bit = true;
- };
};
services = {
acpid = {
enable = true;
- lidEventCommands = ''
- if grep -q closed /proc/acpi/button/lid/LID/state; then
- date >> /tmp/i3lock.log
- DISPLAY=":0.0" XAUTHORITY=/home/fadenb/.Xauthority ${pkgs.i3lock}/bin/i3lock &>> /tmp/i3lock.log
- fi
- '';
- };
- tlp = {
- enable = true;
};
xserver = {
synaptics.enable = false;
diff --git a/nix/default.nix b/nix/default.nix
@@ -9,4 +9,6 @@ rec {
pkgs-unstable = import sources.nixos-unstable;
nixpkgs = import sources.nixpkgs;
emacs = import sources.emacs-overlay;
+ gitignore = import sources.gitignore;
+ nixos-hardware = import sources.nixos-hardware;
}
diff --git a/nix/sources.json b/nix/sources.json
@@ -59,6 +59,18 @@
"url": "https://github.com/NixOS/nixpkgs-channels/archive/48723f48ab92381f0afd50143f38e45cf3080405.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
+ "nixos-hardware": {
+ "branch": "master",
+ "description": "A collection of NixOS modules covering hardware quirks.",
+ "homepage": "",
+ "owner": "NixOS",
+ "repo": "nixos-hardware",
+ "rev": "2f2c2d9ef5dcc663a504819ad73cc98a4cd26458",
+ "sha256": "159qnxmy720jqhg4zm8di0my1r56ya94m6kd117n8kng8hdsmvgi",
+ "type": "tarball",
+ "url": "https://github.com/NixOS/nixos-hardware/archive/2f2c2d9ef5dcc663a504819ad73cc98a4cd26458.tar.gz",
+ "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
+ },
"nixos-unstable": {
"branch": "nixos-unstable",
"description": "A read-only mirror of NixOS/nixpkgs tracking the released channels. Send issues and PRs to",
diff --git a/systems/hokkaido.nix b/systems/hokkaido.nix
@@ -10,6 +10,7 @@ in
{
imports = [
(import ../nix).home-manager
+ (import ../nix).nixos-hardware
../modules/module-list.nixos.nix
# hardware
../hardware/thinkpad-x220.nix
@@ -68,6 +69,7 @@ in
"nixos-config=${dummyConfig}"
"nixpkgs=/run/current-system/nixpkgs"
"nixpkgs-overlays=/run/current-system/overlays/compat"
+ "nixos-hardware=${nixos-hardware}"
];
nixpkgs = {