Compare commits
2 Commits
d9bc4f15d8
...
e8dff5ece1
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e8dff5ece1 | ||
![]() |
e22b5c1c6c |
@ -11,4 +11,19 @@
|
||||
environment.systemPackages = with pkgs; [
|
||||
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,30 +5,42 @@
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
activatedWg = name: {
|
||||
networking.wg-quick.interfaces."${name}".configFile = "/persist/manual/wireguard/${name}.conf";
|
||||
systemd.services."wg-quick-${name}" = {
|
||||
after = [
|
||||
"nss-lookup.target"
|
||||
"systemd-resolved.service"
|
||||
"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) {
|
||||
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"
|
||||
"systemd-resolved.service"
|
||||
"multi-user.target"
|
||||
];
|
||||
|
||||
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";
|
||||
};
|
||||
config = lib.mkIf (!config.me.buildingIso) wgConfig;
|
||||
|
||||
# environment.systemPackages = with pkgs; [
|
||||
# wireguard-tools
|
||||
|
Loading…
x
Reference in New Issue
Block a user