nixos/gollum: add package option

This commit is contained in:
Jörg Thalheim 2022-09-10 17:56:33 +02:00
parent 54ce16370b
commit 6a66cf1b90

View file

@ -87,6 +87,14 @@ in
description = lib.mdDoc "Specifies the path of the repository directory. If it does not exist, Gollum will create it on startup.";
};
package = mkOption {
type = types.package;
default = pkgs.gollum;
defaultText = literalExpression "pkgs.gollum";
description = lib.mdDoc ''
The package used in the service
'';
};
};
config = mkIf cfg.enable {
@ -120,7 +128,7 @@ in
Group = config.users.groups.gollum.name;
WorkingDirectory = cfg.stateDir;
ExecStart = ''
${pkgs.gollum}/bin/gollum \
${cfg.package}/bin/gollum \
--port ${toString cfg.port} \
--host ${cfg.address} \
--config ${pkgs.writeText "gollum-config.rb" cfg.extraConfig} \