forked from pub-solar/os
dumpyourvms: fixes for amd power save and resume
and cups mDNS with systemd-resolved
This commit is contained in:
parent
d21c7631ab
commit
cbe1deee5b
|
@ -73,7 +73,6 @@ in {
|
|||
Domains=~.
|
||||
DNSOverTLS=yes
|
||||
DNSSEC=false
|
||||
MulticastDNS=no
|
||||
'';
|
||||
};
|
||||
networking = import ./networking.nix;
|
||||
|
@ -88,14 +87,14 @@ in {
|
|||
path = [pkgs.bash];
|
||||
description = "Power Off dedicated AMD Card to reduce power usage";
|
||||
requires = ["sys-kernel-debug.mount"];
|
||||
enable = false;
|
||||
enable = true;
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStart = "${pkgs.bash}/bin/sh -c 'echo -e \"IGD\\nOFF\" > /sys/kernel/debug/vgaswitcheroo/switch'";
|
||||
ExecStart = "${pkgs.bash}/bin/sh -c 'sleep 7 && echo -e \"IGD\\nOFF\" > /sys/kernel/debug/vgaswitcheroo/switch'";
|
||||
ExecStop = "${pkgs.bash}/bin/sh -c 'echo ON >/sys/kernel/debug/vgaswitcheroo/switch'";
|
||||
};
|
||||
wantedBy = ["graphical.target"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
};
|
||||
|
||||
# Increase console font size for HiDPI display
|
||||
|
@ -133,9 +132,12 @@ in {
|
|||
${pkgs.systemd}/bin/systemctl stop amd-hybrid-graphics-power-save.service
|
||||
''
|
||||
);
|
||||
resumeCommands = ''
|
||||
${pkgs.systemd}/bin/systemctl start amd-hybrid-graphics-power-save.service
|
||||
'';
|
||||
resumeCommands =
|
||||
if config.systemd.services."amd-hybrid-graphics-power-save".enable == true
|
||||
then ''
|
||||
${pkgs.systemd}/bin/systemctl start amd-hybrid-graphics-power-save.service
|
||||
''
|
||||
else "";
|
||||
};
|
||||
|
||||
# Change lid switch behaviour
|
||||
|
|
Loading…
Reference in a new issue