diff --git a/nixos/modules/programs/openvpn3.nix b/nixos/modules/programs/openvpn3.nix index 780f4d7763227..0001aa5f4c0e5 100644 --- a/nixos/modules/programs/openvpn3.nix +++ b/nixos/modules/programs/openvpn3.nix @@ -4,7 +4,8 @@ let json = pkgs.formats.json { }; cfg = config.programs.openvpn3; - inherit (lib) mkEnableOption mkPackageOption mkOption literalExpression max options lists; + inherit (lib) + mkEnableOption mkPackageOption mkOption literalExpression max options lists; inherit (lib.types) bool submodule ints; in { options.programs.openvpn3 = { @@ -16,7 +17,8 @@ in { type = submodule { options = { settings = mkOption { - description = "Options stored in {file}`/etc/openvpn3/netcfg.json` configuration file"; + description = + "Options stored in {file}`/etc/openvpn3/netcfg.json` configuration file"; default = { }; type = submodule { freeformType = json.type; @@ -25,7 +27,8 @@ in { type = bool; description = "Whether to use systemd-resolved integration"; default = config.services.resolved.enable; - defaultText = literalExpression "config.services.resolved.enable"; + defaultText = + literalExpression "config.services.resolved.enable"; example = false; }; }; @@ -40,7 +43,8 @@ in { type = submodule { options = { settings = mkOption { - description = "Options stored in {file}`/etc/openvpn3/log-service.json` configuration file"; + description = + "Options stored in {file}`/etc/openvpn3/log-service.json` configuration file"; default = { }; type = submodule { freeformType = json.type; @@ -101,7 +105,12 @@ in { }; }; - systemd.packages = [ cfg.package ]; + systemd = { + packages = [ cfg.package ]; + tmpfiles.rules = [ + "d /etc/openvpn3/configs 0755 openvpn openvpn - -" + ]; + }; }; meta.maintainers = with lib.maintainers; [ shamilton progrm_jarvis ];