Add laptop module and remove unused dotfiles
This commit is contained in:
@@ -13,5 +13,6 @@
|
||||
./common.nix
|
||||
./networking.nix
|
||||
./games.nix
|
||||
./laptop.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ in
|
||||
xdg.portal.config.common = [ "wlr" "gtk" ];
|
||||
programs.thunar.enable = true;
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
liberation_ttf
|
||||
|
||||
28
modules/nix/laptop.nix
Normal file
28
modules/nix/laptop.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ lib
|
||||
, pkgs
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib; let
|
||||
cfg = config.simmer.laptop;
|
||||
in
|
||||
{
|
||||
|
||||
config.programs.light.enable = mkIf cfg.backlight.enable true;
|
||||
|
||||
config.powerManagement.powertop.enable = mkIf cfg.powersave.enable true;
|
||||
config.services.auto-cpufreq = mkIf cfg.powersave.enable {
|
||||
enable = true;
|
||||
settings = {
|
||||
battery = {
|
||||
governor = "powersave";
|
||||
turbo = "never";
|
||||
};
|
||||
charger = {
|
||||
governor = "performance";
|
||||
turbo = "auto";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user