diff --git a/users/wpcarro/nixos/marcus/default.nix b/users/wpcarro/nixos/marcus/default.nix index 0dc4fc57f..db3472926 100644 --- a/users/wpcarro/nixos/marcus/default.nix +++ b/users/wpcarro/nixos/marcus/default.nix @@ -4,6 +4,8 @@ let inherit (depot.users) wpcarro; + usermod = name: depot.path.origSrc + ("/users/wpcarro/nixos/modules/${name}"); + wpcarrosEmacs = wpcarro.emacs.nixos { load = [ ./marcus.el ]; }; @@ -18,6 +20,7 @@ in imports = [ (depot.path.origSrc + "/users/wpcarro/nixos/marcus/hardware.nix") (pkgs.home-manager.src + "/nixos") + (usermod "laptop.nix") ]; # Use the TVL binary cache @@ -111,9 +114,7 @@ in }; }; - programs = wpcarro.common.programs // { - light.enable = true; - }; + programs = wpcarro.common.programs; environment.variables = { EDITOR = "emacsclient"; diff --git a/users/wpcarro/nixos/modules/laptop.nix b/users/wpcarro/nixos/modules/laptop.nix new file mode 100644 index 000000000..03dd0f39b --- /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; +} +