[fanny] fix flushing init vpn
All checks were successful
Check flake syntax / flake-check (push) Successful in 4m46s
All checks were successful
Check flake syntax / flake-check (push) Successful in 4m46s
This commit is contained in:
@@ -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 = {
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user