nixos/wireguard: add wireguard to default kernel modules

Previously the module was only dynamically loaded on service startup,
this is needed in case security.lockKernelModules is enabled.
This commit is contained in:
Rodrigo Gryzinski 2023-09-09 16:41:10 +01:00 committed by Anderson Torres
parent fadcbfcc68
commit 23a5f1f80d

View File

@ -586,6 +586,7 @@ in
}) all_peers;
boot.extraModulePackages = optional (versionOlder kernel.kernel.version "5.6") kernel.wireguard;
boot.kernelModules = [ "wireguard" ];
environment.systemPackages = [ pkgs.wireguard-tools ];
systemd.services =