[fanny] fix flushing init vpn
All checks were successful
Check flake syntax / flake-check (push) Successful in 4m46s

This commit is contained in:
2025-11-15 17:49:54 +01:00
parent a97de389e5
commit b94574c640
2 changed files with 18 additions and 4 deletions

View File

@@ -91,10 +91,10 @@ in
boot.initrd = { boot.initrd = {
availableKernelModules = [ "wireguard" ]; availableKernelModules = [ "wireguard" ];
postMountCommands = '' # postMountCommands = ''
ip address flush dev wg-initrd # ip address flush dev wg-initrd
ip link set dev wg-initrd down # ip link set dev wg-initrd down
''; # '';
systemd = { systemd = {
enable = true; enable = true;
network = { network = {

View File

@@ -45,6 +45,20 @@ in
initrdBin = [ pkgs.busybox pkgs.wireguard-tools pkgs.iproute2 ]; initrdBin = [ pkgs.busybox pkgs.wireguard-tools pkgs.iproute2 ];
enable = true; enable = true;
network.enable = true; network.enable = true;
services."stopInitVpn" = {
description = "stop init vpn";
wantedBy = [
"initrd.target"
];
after = [
"zfs.target"
];
serviceConfig.StandardOutput = "journal+console";
script = ''
networkctl down wg-initrd
'';
serviceConfig.Type = "oneshot";
};
}; };
network = { network = {
flushBeforeStage2 = true; flushBeforeStage2 = true;