From ab0cca019bd574b396cf2ccc9ca6a5531bd87856 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Fri, 1 Jul 2022 10:06:37 -0700 Subject: feat(wpcarro/nixos): Support laptop.nix module Define shared laptop configuration. The primary impetus of this change was `powerManagement.powertop`. Change-Id: Icbd04a252005ab391dc8f7d5ebf0968af91f2e0c Reviewed-on: https://cl.tvl.fyi/c/depot/+/5910 Tested-by: BuildkiteCI Reviewed-by: wpcarro Autosubmit: wpcarro --- users/wpcarro/nixos/modules/laptop.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 users/wpcarro/nixos/modules/laptop.nix (limited to 'users/wpcarro/nixos/modules/laptop.nix') diff --git a/users/wpcarro/nixos/modules/laptop.nix b/users/wpcarro/nixos/modules/laptop.nix new file mode 100644 index 000000000000..03dd0f39bb81 --- /dev/null +++ b/users/wpcarro/nixos/modules/laptop.nix @@ -0,0 +1,15 @@ +# Laptop-specific NixOS configuration. +_: + +{ + # Automatically detect location for redshift. + services.geoclue2.enable = true; + location.provider = "geoclue2"; + + # Enable power-saving features. + powerManagement.powertop.enable = true; + + # Backlight control command. + programs.light.enable = true; +} + -- cgit 1.4.1