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=~.
|
Domains=~.
|
||||||
DNSOverTLS=yes
|
DNSOverTLS=yes
|
||||||
DNSSEC=false
|
DNSSEC=false
|
||||||
MulticastDNS=no
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
networking = import ./networking.nix;
|
networking = import ./networking.nix;
|
||||||
|
@ -88,14 +87,14 @@ in {
|
||||||
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";
|
||||||
requires = ["sys-kernel-debug.mount"];
|
requires = ["sys-kernel-debug.mount"];
|
||||||
enable = false;
|
enable = true;
|
||||||
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 'sleep 7 && 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 = ["graphical.target"];
|
wantedBy = ["multi-user.target"];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Increase console font size for HiDPI display
|
# Increase console font size for HiDPI display
|
||||||
|
@ -133,9 +132,12 @@ in {
|
||||||
${pkgs.systemd}/bin/systemctl stop amd-hybrid-graphics-power-save.service
|
${pkgs.systemd}/bin/systemctl stop amd-hybrid-graphics-power-save.service
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
resumeCommands = ''
|
resumeCommands =
|
||||||
|
if config.systemd.services."amd-hybrid-graphics-power-save".enable == true
|
||||||
|
then ''
|
||||||
${pkgs.systemd}/bin/systemctl start amd-hybrid-graphics-power-save.service
|
${pkgs.systemd}/bin/systemctl start amd-hybrid-graphics-power-save.service
|
||||||
'';
|
''
|
||||||
|
else "";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Change lid switch behaviour
|
# Change lid switch behaviour
|
||||||
|
|
Loading…
Reference in a new issue