Merge pull request #190695 from Mic92/gollum
nixos/gollum: add package option
This commit is contained in:
commit
67db9b4ad1
4 changed files with 26 additions and 2 deletions
|
@ -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} \
|
||||
|
|
|
@ -189,6 +189,7 @@ in {
|
|||
gobgpd = handleTest ./gobgpd.nix {};
|
||||
gocd-agent = handleTest ./gocd-agent.nix {};
|
||||
gocd-server = handleTest ./gocd-server.nix {};
|
||||
gollum = handleTest ./gollum.nix {};
|
||||
google-oslogin = handleTest ./google-oslogin {};
|
||||
gotify-server = handleTest ./gotify-server.nix {};
|
||||
grafana = handleTest ./grafana.nix {};
|
||||
|
|
14
nixos/tests/gollum.nix
Normal file
14
nixos/tests/gollum.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
name = "gollum";
|
||||
|
||||
nodes = {
|
||||
webserver = { pkgs, lib, ... }: {
|
||||
services.gollum.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = { nodes, ... }: ''
|
||||
webserver.wait_for_unit("gollum")
|
||||
webserver.wait_for_open_port(${toString nodes.webserver.config.services.gollum.port})
|
||||
'';
|
||||
})
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, bundlerApp, bundlerUpdateScript, ruby, makeWrapper, git, docutils }:
|
||||
{ lib, bundlerApp, bundlerUpdateScript, ruby, makeWrapper, git, docutils, nixosTests }:
|
||||
|
||||
bundlerApp rec {
|
||||
pname = "gollum";
|
||||
|
@ -10,6 +10,7 @@ bundlerApp rec {
|
|||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
passthru.updateScript = bundlerUpdateScript "gollum";
|
||||
passthru.tests.gollum = nixosTests.gollum;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A simple, Git-powered wiki with a sweet API and local frontend";
|
||||
|
|
Loading…
Reference in a new issue