diff options
author | Azat Bahawi <azat@bahawi.net> | 2024-03-31 21:29:27 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2024-03-31 21:29:27 +0300 |
commit | 9a5427e3a0c0ccf2a82dc503149a26b23fbd6004 (patch) | |
tree | f28beec29deeea36038615a8fb98a810891940b5 /nixosConfigurations/melian/default.nix | |
parent | 2024-03-19 (diff) |
2024-03-31
Diffstat (limited to '')
-rw-r--r-- | nixosConfigurations/melian/default.nix | 63 |
1 files changed, 35 insertions, 28 deletions
diff --git a/nixosConfigurations/melian/default.nix b/nixosConfigurations/melian/default.nix index 64dd152..0805b4a 100644 --- a/nixosConfigurations/melian/default.nix +++ b/nixosConfigurations/melian/default.nix @@ -1,9 +1,6 @@ +{ lib, pkgs, ... }: +with lib; { - lib, - pkgs, - ... -}: -with lib; { nixfiles.modules = { wireguard.client.enable = true; @@ -22,25 +19,27 @@ with lib; { sensitivity = 250; }; - powerManagement = let - modprobe = getExe' pkgs.kmod "modprobe"; - in { - enable = true; + powerManagement = + let + modprobe = getExe' pkgs.kmod "modprobe"; + in + { + enable = true; - # This fixes an issue with not being able to suspend or wake up from - # suspend due to a kernel bug[1] which is still not fixed. - # - # I guess this can also be fixed differently[2], which does look a lot nicer - # but I'm just too lazy. - # - # [1]: https://bbs.archlinux.org/viewtopic.php?id=270964 - # [1]: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/522998 - # [1]: https://bugs.launchpad.net/ubuntu/+source/pm-utils/+bug/562484/comments/3 - # [1]: https://gist.github.com/ioggstream/8f380d398aef989ac455b93b92d42048 - # [2]: https://linrunner.de/tlp/settings/runtimepm.html - powerDownCommands = "${modprobe} -r xhci_pci"; - powerUpCommands = "${modprobe} xhci_pci"; - }; + # This fixes an issue with not being able to suspend or wake up from + # suspend due to a kernel bug[1] which is still not fixed. + # + # I guess this can also be fixed differently[2], which does look a lot nicer + # but I'm just too lazy. + # + # [1]: https://bbs.archlinux.org/viewtopic.php?id=270964 + # [1]: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/522998 + # [1]: https://bugs.launchpad.net/ubuntu/+source/pm-utils/+bug/562484/comments/3 + # [1]: https://gist.github.com/ioggstream/8f380d398aef989ac455b93b92d42048 + # [2]: https://linrunner.de/tlp/settings/runtimepm.html + powerDownCommands = "${modprobe} -r xhci_pci"; + powerUpCommands = "${modprobe} xhci_pci"; + }; services = { thinkfan = { @@ -50,13 +49,21 @@ with lib; { { hwmon = "/sys/class/hwmon"; name = "coretemp"; - indices = [1]; + indices = [ 1 ]; } ]; - fans = [{tpacpi = "/proc/acpi/ibm/fan";}]; + fans = [ { tpacpi = "/proc/acpi/ibm/fan"; } ]; levels = [ - ["level auto" 0 50] - ["level disengaged" 50 32767] # This could annoy some people but IDGAF. + [ + "level auto" + 0 + 50 + ] + [ + "level disengaged" + 50 + 32767 + ] # This could annoy some people but IDGAF. ]; }; }; @@ -74,7 +81,7 @@ with lib; { "/" = { device = "/dev/disk/by-uuid/bb8b09dc-cc67-47e5-8280-532b17a9e62a"; fsType = "xfs"; - options = ["noatime"]; + options = [ "noatime" ]; }; "/boot" = { |