mirror of
https://github.com/divnix/digga.git
synced 2024-12-26 01:26:23 +03:00
laptop: init profile
This commit is contained in:
parent
653012f81a
commit
3769abafa3
54
profiles/laptop/default.nix
Normal file
54
profiles/laptop/default.nix
Normal file
@ -0,0 +1,54 @@
|
||||
{ pkgs, ... }:
|
||||
let inherit (pkgs) lm_sensors wirelesstools pciutils;
|
||||
in {
|
||||
environment.systemPackages = [ lm_sensors wirelesstools pciutils ];
|
||||
|
||||
# to enable brightness keys 'keys' value may need updating per device
|
||||
programs.light.enable = true;
|
||||
services.actkbd = {
|
||||
enable = true;
|
||||
bindings = [
|
||||
{
|
||||
keys = [ 225 ];
|
||||
events = [ "key" ];
|
||||
command = "/run/current-system/sw/bin/light -A 5";
|
||||
}
|
||||
{
|
||||
keys = [ 224 ];
|
||||
events = [ "key" ];
|
||||
command = "/run/current-system/sw/bin/light -U 5";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
sound.mediaKeys = {
|
||||
enable = true;
|
||||
volumeStep = "1dB";
|
||||
};
|
||||
|
||||
# better timesync for unstable internet connections
|
||||
services.chrony.enable = true;
|
||||
services.timesyncd.enable = false;
|
||||
|
||||
# power management features
|
||||
services.tlp.enable = true;
|
||||
services.tlp.extraConfig = ''
|
||||
CPU_SCALING_GOVERNOR_ON_AC=performance
|
||||
CPU_SCALING_GOVERNOR_ON_BAT=powersave
|
||||
CPU_HWP_ON_AC=performance
|
||||
'';
|
||||
services.logind.lidSwitch = "suspend";
|
||||
|
||||
nixpkgs.overlays = let
|
||||
light_ov = self: super: {
|
||||
light = super.light.overrideAttrs (o: {
|
||||
src = self.fetchFromGitHub {
|
||||
owner = "haikarainen";
|
||||
repo = "light";
|
||||
rev = "ae7a6ebb45a712e5293c7961eed8cceaa4ebf0b6";
|
||||
sha256 = "00z9bxrkjpfmfhz9fbf6mjbfqvixx6857mvgmiv01fvvs0lr371n";
|
||||
};
|
||||
});
|
||||
};
|
||||
in [ light_ov ];
|
||||
}
|
Loading…
Reference in New Issue
Block a user