dumpyourvms: nixos-unstable fixes

hidpi.enable option has been removed
disable amd-power-save service on boot for now
add opengl intel-media-driver extraPackages
use bluetooth option to power off upon boot
This commit is contained in:
teutat3s 2023-05-18 00:06:30 +02:00
parent 4c4e889e27
commit 5db371f648
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1
2 changed files with 5 additions and 10 deletions

View file

@ -51,6 +51,9 @@ in {
hardware = {
cpu.intel.updateMicrocode = true;
facetimehd.enable = true;
opengl = {
extraPackages = with pkgs; [intel-media-driver];
};
};
services.resolved = {
@ -71,26 +74,21 @@ in {
security.pki.certificateFiles = [./consul-agent-ca.pem];
# Disable bluetooth on startup to save battery
services.cron.systemCronJobs = [
"@reboot root ${pkgs.util-linux}/bin/rfkill block bluetooth"
];
# Power off dedicated GPU, use only integrated Intel GPU to save battery
# https://github.com/NixOS/nixpkgs/pull/33915
# https://ubuntuforums.org/showthread.php?t=2409856
systemd.services."amd-hybrid-graphics-power-save" = {
path = [pkgs.bash];
description = "Power Off dedicated AMD Card to reduce power usage";
after = ["graphical-session.target"];
requires = ["sys-kernel-debug.mount"];
enable = false;
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${pkgs.bash}/bin/sh -c 'echo -e \"IGD\\nOFF\" > /sys/kernel/debug/vgaswitcheroo/switch'";
ExecStop = "${pkgs.bash}/bin/sh -c 'echo ON >/sys/kernel/debug/vgaswitcheroo/switch'";
};
wantedBy = ["multi-user.target"];
wantedBy = ["graphical.target"];
};
# Increase console font size for HiDPI display

View file

@ -36,7 +36,4 @@
size = 18432;
}
];
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;
}