From 9fdccf93e4c6180aaf9085d5fb2372c24658955b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 2 Apr 2022 08:14:30 +0100 Subject: [PATCH] i3status rust --- nixos/boxes/foureighty/default.nix | 35 ++---------------------------- nixos/boxes/foureighty/thermal.nix | 35 ++++++++++++++++++++++++++++++ nixos/i3/home.nix | 2 +- nixos/i3/i3status-rust.nix | 12 ++++++++++ 4 files changed, 50 insertions(+), 34 deletions(-) create mode 100644 nixos/boxes/foureighty/thermal.nix create mode 100644 nixos/i3/i3status-rust.nix diff --git a/nixos/boxes/foureighty/default.nix b/nixos/boxes/foureighty/default.nix index 1c851a10..bc74dbc4 100644 --- a/nixos/boxes/foureighty/default.nix +++ b/nixos/boxes/foureighty/default.nix @@ -3,9 +3,10 @@ imports = [ inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480 + ./custom-kernel.nix ./hardware-configuration.nix ./tailscale-foureighty.nix - ./custom-kernel.nix + ./thermal.nix ../../backups.nix ../../boot.nix ../../common.nix @@ -37,38 +38,6 @@ }; hardware.trackpoint.enable = true; services.hardware.bolt.enable = true; - boot.extraModprobeConfig = "options thinkpad_acpi fan_control=1"; - services.thinkfan = { - enable = true; - levels = [ - [ 0 0 55 ] - [ 1 48 60 ] - [ 2 50 61 ] - [ 3 52 63 ] - [ 6 56 65 ] - [ 7 60 85 ] - [ "level full-speed" 80 32767 ] - ]; - sensors = [ - { - type = "hwmon"; - query = "/sys/class/hwmon"; - name = "coretemp"; - indices = [ 1 2 3 ]; - } - { - type = "hwmon"; - query = "/sys/devices/platform/thinkpad_hwmon/hwmon"; - indices = [ 1 ]; - } - { - type = "tpacpi"; - query = "/proc/acpi/ibm/thermal"; - indices = [ 0 ]; - } - ]; - }; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.video.hidpi.enable = lib.mkDefault true; services.fprintd = { enable = true; }; diff --git a/nixos/boxes/foureighty/thermal.nix b/nixos/boxes/foureighty/thermal.nix new file mode 100644 index 00000000..511c6aa4 --- /dev/null +++ b/nixos/boxes/foureighty/thermal.nix @@ -0,0 +1,35 @@ +{ config, pkgs, lib, ... }: { + + boot.extraModprobeConfig = "options thinkpad_acpi fan_control=1"; + services.thinkfan = { + enable = true; + levels = [ + [ 0 0 55 ] + [ 1 48 60 ] + [ 2 50 61 ] + [ 3 52 63 ] + [ 6 56 65 ] + [ 7 60 85 ] + [ "level full-speed" 80 32767 ] + ]; + sensors = [ + { + type = "hwmon"; + query = "/sys/class/hwmon"; + name = "coretemp"; + indices = [ 1 2 3 ]; + } + { + type = "hwmon"; + query = "/sys/devices/platform/thinkpad_hwmon/hwmon"; + indices = [ 1 ]; + } + { + type = "tpacpi"; + query = "/proc/acpi/ibm/thermal"; + indices = [ 0 ]; + } + ]; + }; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; +} diff --git a/nixos/i3/home.nix b/nixos/i3/home.nix index 1406ca27..c9372f07 100644 --- a/nixos/i3/home.nix +++ b/nixos/i3/home.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: { imports = [ ./i3.nix - ./i3-status.nix + ./i3status-rust.nix ./dunst.nix ./rofi.nix ./kdeconnect.nix diff --git a/nixos/i3/i3status-rust.nix b/nixos/i3/i3status-rust.nix new file mode 100644 index 00000000..b17c0794 --- /dev/null +++ b/nixos/i3/i3status-rust.nix @@ -0,0 +1,12 @@ +{ config, pkgs, ... }: { + + programs.i3status-rust = { + enable = true; + bars = { + top = { + icons = "awesome5"; + theme = "solarized-dark"; + }; + }; + }; +}