Compare commits
No commits in common. "e8dff5ece1505de6071e01441ebdca91fe034db0" and "d9bc4f15d8adaeccbc494dc33e67a9fafbe4363a" have entirely different histories.
e8dff5ece1
...
d9bc4f15d8
@ -11,19 +11,4 @@
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
powertop
|
powertop
|
||||||
];
|
];
|
||||||
|
|
||||||
# amdgpu.abmlevel=3 :: Automatically reduce screen brightness but tweak colors to compensate for power reduction.
|
|
||||||
# pcie_aspm=force pcie_aspm.policy=powersupersave :: Enable PCIe active state power management for power reduction.
|
|
||||||
# nowatchdog :: Disable watchdog for power savings (related to disable_sp5100_watchdog above).
|
|
||||||
# amd_pstate=passive :: Fully automated hardware pstate control.
|
|
||||||
# amd_pstate=active :: Same as passive except we can set the energy performance preference (EPP) to suggest how much we prefer performance or energy efficiency.
|
|
||||||
# amd_pstate=guided :: Same as passive except we can set upper and lower frequency bounds.
|
|
||||||
# amdgpu.dcdebugmask=0x10 :: Allegedly disables Panel Replay from https://community.frame.work/t/tracking-freezing-arch-linux-amd/39495/32
|
|
||||||
boot.kernelParams = [
|
|
||||||
"amdgpu.abmlevel=3"
|
|
||||||
"pcie_aspm=force"
|
|
||||||
"pcie_aspm.policy=powersupersave"
|
|
||||||
"nowatchdog"
|
|
||||||
"amdgpu.dcdebugmask=0x10"
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
@ -5,42 +5,30 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
{
|
||||||
activatedWg = name: {
|
imports = [ ];
|
||||||
networking.wg-quick.interfaces."${name}".configFile = "/persist/manual/wireguard/${name}.conf";
|
|
||||||
systemd.services."wg-quick-${name}" = {
|
config = lib.mkIf (!config.me.buildingIso) {
|
||||||
after = [
|
networking.firewall.allowedUDPPorts = [ 51821 ];
|
||||||
|
networking.wireguard.enable = true;
|
||||||
|
networking.wg-quick.interfaces.drmario.configFile = "/persist/manual/wireguard/drmario.conf";
|
||||||
|
systemd.services."wg-quick-drmario".after = [
|
||||||
"nss-lookup.target"
|
"nss-lookup.target"
|
||||||
"systemd-resolved.service"
|
"systemd-resolved.service"
|
||||||
"multi-user.target"
|
"multi-user.target"
|
||||||
];
|
];
|
||||||
preStart = "${pkgs.toybox}/bin/sleep 10";
|
|
||||||
};
|
|
||||||
# systemd.services."wg-quick-${name}".after = [
|
|
||||||
# "nss-lookup.target"
|
|
||||||
# "systemd-resolved.service"
|
|
||||||
# "multi-user.target"
|
|
||||||
# ];
|
|
||||||
# systemd.services."wg-quick-${name}".preStart = "${pkgs.toybox}/bin/sleep 10";
|
|
||||||
};
|
|
||||||
deactivatedWg = name: {
|
|
||||||
networking.wg-quick.interfaces."${name}" = {
|
|
||||||
configFile = "/persist/manual/wireguard/${name}.conf";
|
|
||||||
autostart = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
wgConfig = lib.attrsets.recursiveUpdate (lib.attrsets.recursiveUpdate (lib.attrsets.recursiveUpdate
|
|
||||||
(lib.attrsets.recursiveUpdate {
|
|
||||||
networking.firewall.allowedUDPPorts = [ 51821 ];
|
|
||||||
networking.wireguard.enable = true;
|
|
||||||
} (activatedWg "drmario"))
|
|
||||||
(activatedWg "wgh")
|
|
||||||
) (activatedWg "colo")) (deactivatedWg "wgf");
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
config = lib.mkIf (!config.me.buildingIso) wgConfig;
|
systemd.services."wg-quick-drmario".preStart = "${pkgs.toybox}/bin/sleep 10";
|
||||||
|
|
||||||
|
networking.wg-quick.interfaces.wgh.configFile = "/persist/manual/wireguard/wgh.conf";
|
||||||
|
systemd.services."wg-quick-wgh".after = [
|
||||||
|
"nss-lookup.target"
|
||||||
|
"systemd-resolved.service"
|
||||||
|
"multi-user.target"
|
||||||
|
];
|
||||||
|
|
||||||
|
systemd.services."wg-quick-wgh".preStart = "${pkgs.toybox}/bin/sleep 10";
|
||||||
|
};
|
||||||
|
|
||||||
# environment.systemPackages = with pkgs; [
|
# environment.systemPackages = with pkgs; [
|
||||||
# wireguard-tools
|
# wireguard-tools
|
||||||
|
Loading…
x
Reference in New Issue
Block a user