Fixed openssh

This commit is contained in:
rasmus-kirk
2024-02-26 15:42:33 +01:00
parent 10c674687a
commit c9eb47ce1c
+8 -2
View File
@@ -29,8 +29,14 @@ in {
'';
};
config = mkIf cfg.enable {
systemd.services.openssh = mkIf (cfg.vpn.enable && config.services.openssh.enable) {
config = mkIf (cfg.vpn.enable && config.services.openssh.enable) {
util-nixarr.vpnnamespace = {
portMappings = builtins.map (x: { From = x; To = x; }) config.services.openssh.ports;
openUdpPorts = config.services.openssh.ports;
openTcpPorts = config.services.openssh.ports;
};
systemd.services.openssh = {
bindsTo = [ "netns@wg.service" ];
requires = [ "network-online.target" ];
after = [ "wg.service" ];