From cb54acdff6bd5131e82e45bdbd58389544b451bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 12 Jun 2021 10:31:25 +0100 Subject: [PATCH] use nixos-hardware for t480 --- flake.lock | 12 ++++++------ flake.nix | 4 ++-- nixos/boxes/foureighty/hardware-configuration.nix | 9 +++++---- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 5df78706..c1cb9ee9 100644 --- a/flake.lock +++ b/flake.lock @@ -74,16 +74,16 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1623315106, - "narHash": "sha256-a2/8mVCuZWQUIWOQGCmUvtT813ZwnL0VRdwE3VzRaLU=", - "owner": "NixOS", + "lastModified": 1623489190, + "narHash": "sha256-p+aJJZ2BE57+59FDjHuUzaWow1M+bZ0MZDxqeB2/TKI=", + "owner": "cyplo", "repo": "nixos-hardware", - "rev": "6bea9761693b5d185d34bef205edb25a8081db57", + "rev": "1a4ac0b996f2bd5f2fba8b94ea5d7c96d1f6e114", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "master", + "owner": "cyplo", + "ref": "add-t480", "repo": "nixos-hardware", "type": "github" } diff --git a/flake.nix b/flake.nix index 4dd8de08..d507fe81 100644 --- a/flake.nix +++ b/flake.nix @@ -67,9 +67,9 @@ nixos-hardware = { type = "github"; - owner = "NixOS"; + owner = "cyplo"; repo = "nixos-hardware"; - ref = "master"; + ref = "add-t480"; }; home-manager = { diff --git a/nixos/boxes/foureighty/hardware-configuration.nix b/nixos/boxes/foureighty/hardware-configuration.nix index 46f72ac8..ba014902 100644 --- a/nixos/boxes/foureighty/hardware-configuration.nix +++ b/nixos/boxes/foureighty/hardware-configuration.nix @@ -1,15 +1,16 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, inputs, ... }: { - imports = [ ]; + imports = [ + inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480 + ]; boot = { kernel.sysctl = { "vm.swappiness" = 75; }; - kernelModules = [ "kvm-intel" "acpi_call" ]; - extraModulePackages = with config.boot.kernelPackages; [ acpi_call ]; + kernelModules = [ "kvm-intel" ]; initrd = { kernelModules = [ "dm-snapshot" ];