Unverified Commit cd02351a authored by Michele Guerini Rocco's avatar Michele Guerini Rocco Committed by GitHub
Browse files

Merge pull request #233017 from koenw/libreswan-StateDirectory

nixos/libreswan: Use StateDirectory to setup ipsec/nss
parents c1f27ae1 0f37581e
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -133,9 +133,6 @@ in
      "ipsec.d/01-nixos.conf".source = configFile;
    } // policyFiles;

    # Create NSS database directory
    systemd.tmpfiles.rules = [ "d /var/lib/ipsec/nss 755 root root -" ];

    systemd.services.ipsec = {
      description = "Internet Key Exchange (IKE) Protocol Daemon for IPsec";
      wantedBy = [ "multi-user.target" ];
@@ -153,6 +150,10 @@ in
        echo 0 | tee /proc/sys/net/ipv4/conf/*/send_redirects
        echo 0 | tee /proc/sys/net/ipv{4,6}/conf/*/accept_redirects
      '';
      serviceConfig = {
        StateDirectory = "ipsec/nss";
        StateDirectoryMode = 0700;
      };
    };

  };