From a37495cc43fbde39391d64763524b920c91c5bc0 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Wed, 29 Jan 2020 15:00:12 +1300 Subject: [PATCH] temperature: add tld and powertop --- configs/sterni/configuration.nix | 3 ++- modules/system/wifi.nix | 1 + system/desktop/default.nix | 6 ++++++ system/desktop/packages.nix | 7 +++++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/configs/sterni/configuration.nix b/configs/sterni/configuration.nix index 5d7c280..f1dc120 100644 --- a/configs/sterni/configuration.nix +++ b/configs/sterni/configuration.nix @@ -10,11 +10,12 @@ ./tinc.nix #./wifi-access-point.nix - #./wireshark.nix ]; + + networking.hostName = "sterni"; system.custom.wifi.interfaces = [ "wlp3s0" ]; diff --git a/modules/system/wifi.nix b/modules/system/wifi.nix index 1701f21..8f03de4 100644 --- a/modules/system/wifi.nix +++ b/modules/system/wifi.nix @@ -40,6 +40,7 @@ in { (mkIf (cfg.system == "networkmanager") { networking.networkmanager.enable = true; + networking.networkmanager.wifi.powersave = true; }) (mkIf (cfg.configurationFile != null) { diff --git a/system/desktop/default.nix b/system/desktop/default.nix index 5825316..52a8455 100644 --- a/system/desktop/default.nix +++ b/system/desktop/default.nix @@ -51,6 +51,12 @@ system.custom = { bluetooth.enable = true; }; + # temperature / power consumption + # https://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-management.html + services.tlp.enable = true; + services.thermald.enable = true; + powerManagement.powertop.enable = true; + # overwrite use zram on small RAM systems fileSystems."/share/" = lib.mkDefault { device = "tmpfs"; diff --git a/system/desktop/packages.nix b/system/desktop/packages.nix index 92a3715..332b9cf 100644 --- a/system/desktop/packages.nix +++ b/system/desktop/packages.nix @@ -292,6 +292,13 @@ in { links lynx + # temperature + s-tui + (pkgs.writers.writeDashBin "temperature" '' + ${pkgs.s-tui}/bin/s-tui + '') + powertop + memo nixfmt dateutils