From 7d14f4a8df1964bddaa70cea65506828ad721a48 Mon Sep 17 00:00:00 2001 From: fruchti Date: Sat, 2 Dec 2023 20:34:17 +0100 Subject: [PATCH 1/2] Disco: Add swap file, earlyoom --- hosts/Disco.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hosts/Disco.nix b/hosts/Disco.nix index 09c5437..8f28c01 100644 --- a/hosts/Disco.nix +++ b/hosts/Disco.nix @@ -172,6 +172,16 @@ LidSwitchIgnoreInhibited = no ''; + services.earlyoom = { + enable = true; + enableNotifications = true; + }; + + swapDevices = [{ + device = "/swapfile"; + size = 16 * 1024; + }]; + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave From d6f2c33a0948feb0b2218b97471df1cd5553c465 Mon Sep 17 00:00:00 2001 From: fruchti Date: Sat, 2 Dec 2023 20:34:42 +0100 Subject: [PATCH 2/2] X270: Try to fix nub wakeup issue --- hosts/x270.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hosts/x270.nix b/hosts/x270.nix index 70b3ef0..30f75e8 100644 --- a/hosts/x270.nix +++ b/hosts/x270.nix @@ -6,6 +6,17 @@ speed = 170; }; + # Ensure that trackpoint mouse buttons work after suspend without having + # to touch the trackpoint first + powerManagement = { + powerDownCommands = '' + modprobe -r psmouse + ''; + resumeCommands = '' + modprobe psmouse + ''; + }; + services.xserver.videoDrivers = [ "modesetting" ]; boot.initrd.kernelModules = [ "i915" ];