nixos-config/ahrc-laptop/configuration.nix

59 lines
1.5 KiB
Nix
Raw Normal View History

2024-10-09 14:06:35 +02:00
{ pkgs, ... }:
2024-09-30 13:54:20 +02:00
{
imports = [ ../common/configuration.nix ./hardware-configuration.nix ];
networking.hostName = "ahrc-laptop";
2024-10-01 19:54:30 +02:00
console.keyMap = "fr-pc";
2024-09-30 13:54:20 +02:00
environment.systemPackages = with pkgs; [ powertop brightnessctl ];
services.libinput.enable = true;
2024-10-21 09:12:36 +02:00
nixpkgs.overlays = [
(final: prev: {
tlp = prev.tlp.overrideAttrs (old: {
makeFlags = (old.makeFlags or [ ]) ++ [
"TLP_ULIB=/lib/udev"
"TLP_NMDSP=/lib/NetworkManager/dispatcher.d"
"TLP_SYSD=/lib/systemd/system"
"TLP_SDSL=/lib/systemd/system-sleep"
"TLP_ELOD=/lib/elogind/system-sleep"
"TLP_CONFDPR=/share/tlp/deprecated.conf"
"TLP_FISHCPL=/share/fish/vendor_completions.d"
"TLP_ZSHCPL=/share/zsh/site-functions"
];
});
})
];
2024-09-30 13:54:20 +02:00
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_MIN_PERF_ON_AC = 100;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 20;
CPU_MAX_PERF_ON_BAT = 100;
};
};
programs.bash.promptInit = ''
if [ "$(whoami)" = root ]; then
color=31
else
color=32
user='\u@'
fi
PS1="\[\033[0m\](\[\033[1;''${color}m\]''${user}\h\[\033[0m\] \[\033[1;34m\]\W\[\033[0m\])\\$ "
'';
system.stateVersion = "24.05";
}