Skip to content

Commit

Permalink
nixos/wireguard: add wireguard to default kernel modules
Browse files Browse the repository at this point in the history
Previously the module was only dynamically loaded on service startup,
this is needed in case security.lockKernelModules is enabled.
  • Loading branch information
RoGryza authored and AndersonTorres committed Nov 8, 2023
1 parent fadcbfc commit 23a5f1f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nixos/modules/services/networking/wireguard.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 23a5f1f

Please sign in to comment.