forked from pub-solar/os
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:
parent
4c4e889e27
commit
5db371f648
|
@ -51,6 +51,9 @@ in {
|
||||||
hardware = {
|
hardware = {
|
||||||
cpu.intel.updateMicrocode = true;
|
cpu.intel.updateMicrocode = true;
|
||||||
facetimehd.enable = true;
|
facetimehd.enable = true;
|
||||||
|
opengl = {
|
||||||
|
extraPackages = with pkgs; [intel-media-driver];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.resolved = {
|
services.resolved = {
|
||||||
|
@ -71,26 +74,21 @@ in {
|
||||||
|
|
||||||
security.pki.certificateFiles = [./consul-agent-ca.pem];
|
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
|
# Power off dedicated GPU, use only integrated Intel GPU to save battery
|
||||||
# https://github.com/NixOS/nixpkgs/pull/33915
|
# https://github.com/NixOS/nixpkgs/pull/33915
|
||||||
# https://ubuntuforums.org/showthread.php?t=2409856
|
# https://ubuntuforums.org/showthread.php?t=2409856
|
||||||
systemd.services."amd-hybrid-graphics-power-save" = {
|
systemd.services."amd-hybrid-graphics-power-save" = {
|
||||||
path = [pkgs.bash];
|
path = [pkgs.bash];
|
||||||
description = "Power Off dedicated AMD Card to reduce power usage";
|
description = "Power Off dedicated AMD Card to reduce power usage";
|
||||||
after = ["graphical-session.target"];
|
|
||||||
requires = ["sys-kernel-debug.mount"];
|
requires = ["sys-kernel-debug.mount"];
|
||||||
|
enable = false;
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
ExecStart = "${pkgs.bash}/bin/sh -c 'echo -e \"IGD\\nOFF\" > /sys/kernel/debug/vgaswitcheroo/switch'";
|
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'";
|
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
|
# Increase console font size for HiDPI display
|
||||||
|
|
|
@ -36,7 +36,4 @@
|
||||||
size = 18432;
|
size = 18432;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
# high-resolution display
|
|
||||||
hardware.video.hidpi.enable = lib.mkDefault true;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue