···302 ###### implementation
303304 config = mkIf (cfg.interfaces != {}) {
305- boot.extraModulePackages = [ kernel.wireguard ];
306 environment.systemPackages = [ pkgs.wireguard-tools ];
307 # This is forced to false for now because the default "--validmark" rpfilter we apply on reverse path filtering
308 # breaks the wg-quick routing because wireguard packets leave with a fwmark from wireguard.
···302 ###### implementation
303304 config = mkIf (cfg.interfaces != {}) {
305+ boot.extraModulePackages = optional (versionOlder kernel.kernel.version "5.6") kernel.wireguard;
306 environment.systemPackages = [ pkgs.wireguard-tools ];
307 # This is forced to false for now because the default "--validmark" rpfilter we apply on reverse path filtering
308 # breaks the wg-quick routing because wireguard packets leave with a fwmark from wireguard.