lots of things (everything is a total mess)

This commit is contained in:
xunuwu 2025-01-05 02:12:52 +01:00
parent 480d649d62
commit 931efc7518
Signed by: xun
SSH key fingerprint: SHA256:Uot/1WoAjWAeqLOHA5vYy4phhVydsH7jCPmBjaPZfgI
22 changed files with 109 additions and 52 deletions

View file

@ -48,12 +48,10 @@ in {
## make sure vpn connection is reasonably fast
## god, there has to be a proper, not horrible way of doing this
## TODO fix this and uhh make sure it works and stuff
# systemd.services."wg-speedcheck" = {
# requires = ["wg.service"];
# enable = false;
# serviceConfig = {
# Type = "oneshot";
# ExecCondition = "${config.systemd.package}/bin/systemctl is-active wg.service"; # horrible, horrible hack, theres 100% a better way
# ExecStart = pkgs.writers.writeBash "wg-speedcheck.sh" ''
# echo "running test in netns"
# vpn_result=$( ${pkgs.iproute2}/bin/ip netns exec wg ${pkgs.speedtest-cli}/bin/speedtest --json )
@ -78,6 +76,14 @@ in {
# };
# };
# systemd.timers."wg-speedcheck" = {
# wantedBy = ["timers.target"];
# timerConfig = {
# OnCalendar = "0/2:00:00";
# Unit = "wg-speedcheck.service";
# };
# };
vpnNamespaces."wg" = {
enable = true;
wireguardConfigFile = config.sops.secrets.wireguard.path;