about summary refs log tree commit diff
path: root/users/wpcarro/nixos/modules/laptop.nix
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2022-07-01T17·06-0700
committerclbot <clbot@tvl.fyi>2022-07-12T04·13+0000
commitab0cca019bd574b396cf2ccc9ca6a5531bd87856 (patch)
tree65e3e99ce2ffc3ada8dd91a5f2b9757301ed340f /users/wpcarro/nixos/modules/laptop.nix
parent5188c689bff93182721abe6160da70ecbdaf8e0b (diff)
feat(wpcarro/nixos): Support laptop.nix module r/4292
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 <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
Diffstat (limited to 'users/wpcarro/nixos/modules/laptop.nix')
-rw-r--r--users/wpcarro/nixos/modules/laptop.nix15
1 files changed, 15 insertions, 0 deletions
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;
+}
+