diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2022-09-10 18:27:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-10 18:27:29 +0200 |
commit | 67db9b4ad1cc6fd8e7c09ee2ab67503967098274 (patch) | |
tree | 54c7cd257b31d2a6a20d1740a2987caebdcae061 /nixos | |
parent | c45deeb2aa67019d216a3dd1baca4a5157bdf123 (diff) | |
parent | ad0108d803c9e74c08d70061301d8780e428abe5 (diff) |
Merge pull request #190695 from Mic92/gollum
nixos/gollum: add package option
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/misc/gollum.nix | 10 | ||||
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/gollum.nix | 14 |
3 files changed, 24 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/gollum.nix b/nixos/modules/services/misc/gollum.nix index a4bed2da8a2f4..ca6f42736a10e 100644 --- a/nixos/modules/services/misc/gollum.nix +++ b/nixos/modules/services/misc/gollum.nix @@ -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} \ diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index f3cde7e23a164..230ad47f3bfac 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -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 {}; diff --git a/nixos/tests/gollum.nix b/nixos/tests/gollum.nix new file mode 100644 index 0000000000000..833db87f2f326 --- /dev/null +++ b/nixos/tests/gollum.nix @@ -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}) + ''; +}) |