mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-23 19:51:54 -05:00
Aly Raffauf
43ff0697fc
Some checks are pending
git-mirror / gitlab-sync (push) Waiting to run
nix-build / adjustor-build (push) Waiting to run
nix-build / clean-install-build (push) Waiting to run
nix-build / hhd-ui-build (push) Waiting to run
nix-build / rofi-bluetooth-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / pacifidlog-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-build / slateport-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run
32 lines
844 B
Nix
32 lines
844 B
Nix
{
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
boot.kernel.sysctl = {
|
|
"kernel.nmi_watchdog" = 0;
|
|
};
|
|
|
|
services = {
|
|
pipewire.wireplumber.extraConfig = {
|
|
# Pipewire eats battery by never disabling the camera.
|
|
"10-disable-camera" = {
|
|
"wireplumber.profiles" = {
|
|
main = {
|
|
"monitor.libcamera" = "disabled";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
power-profiles-daemon.enable = lib.mkDefault true;
|
|
|
|
udev.extraRules = ''
|
|
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_NAME}=="ACAD", ATTR{online}=="1", ACTION=="change", RUN+="${lib.getExe pkgs.power-profiles-daemon} set balanced"
|
|
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_NAME}=="ACAD", ATTR{online}=="0", ACTION=="change", RUN+="${lib.getExe pkgs.power-profiles-daemon} set power-saver"
|
|
'';
|
|
|
|
upower.enable = lib.mkDefault true;
|
|
};
|
|
}
|