From a5215068347747a633c46d2b178a1fc360ea129b Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 1 Aug 2023 15:51:33 +0200 Subject: [PATCH] hedgedoc: use `lib.mkPackageOptionMD` --- nixos/modules/services/web-apps/hedgedoc.nix | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/nixos/modules/services/web-apps/hedgedoc.nix b/nixos/modules/services/web-apps/hedgedoc.nix index e2014a9b7e35..d13f03ab43eb 100644 --- a/nixos/modules/services/web-apps/hedgedoc.nix +++ b/nixos/modules/services/web-apps/hedgedoc.nix @@ -32,6 +32,7 @@ in ]; options.services.hedgedoc = { + package = mkPackageOptionMD pkgs "hedgedoc" { }; enable = mkEnableOption (lib.mdDoc "the HedgeDoc Markdown Editor"); groups = mkOption { @@ -1018,16 +1019,6 @@ in `HedgeDoc` is running. ''; }; - - package = mkOption { - type = types.package; - default = pkgs.hedgedoc; - defaultText = literalExpression "pkgs.hedgedoc"; - description = lib.mdDoc '' - Package that provides HedgeDoc. - ''; - }; - }; config = mkIf cfg.enable { @@ -1060,7 +1051,7 @@ in serviceConfig = { WorkingDirectory = cfg.workDir; StateDirectory = [ cfg.workDir cfg.settings.uploadsPath ]; - ExecStart = "${cfg.package}/bin/hedgedoc"; + ExecStart = "${lib.getExe cfg.package}"; EnvironmentFile = mkIf (cfg.environmentFile != null) [ cfg.environmentFile ]; Environment = [ "CMD_CONFIG_FILE=${cfg.workDir}/config.json"