mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
commit
af4351ab85
5 changed files with 92 additions and 0 deletions
|
@ -806,6 +806,7 @@
|
|||
./services/web-apps/restya-board.nix
|
||||
./services/web-apps/tt-rss.nix
|
||||
./services/web-apps/selfoss.nix
|
||||
./services/web-apps/shiori.nix
|
||||
./services/web-apps/virtlyst.nix
|
||||
./services/web-apps/wordpress.nix
|
||||
./services/web-apps/youtrack.nix
|
||||
|
|
50
nixos/modules/services/web-apps/shiori.nix
Normal file
50
nixos/modules/services/web-apps/shiori.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.shiori;
|
||||
in {
|
||||
options = {
|
||||
services.shiori = {
|
||||
enable = mkEnableOption "Shiori simple bookmarks manager";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.shiori;
|
||||
defaultText = "pkgs.shiori";
|
||||
description = "The Shiori package to use.";
|
||||
};
|
||||
|
||||
address = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
description = ''
|
||||
The IP address on which Shiori will listen.
|
||||
If empty, listens on all interfaces.
|
||||
'';
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 8080;
|
||||
description = "The port of the Shiori web application";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.shiori = with cfg; {
|
||||
description = "Shiori simple bookmarks manager";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${package}/bin/shiori serve --address '${address}' --port '${toString port}'";
|
||||
DynamicUser = true;
|
||||
Environment = "SHIORI_DIR=/var/lib/shiori";
|
||||
StateDirectory = "shiori";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = with maintainers; [ minijackson ];
|
||||
}
|
17
nixos/tests/shiori.nix
Normal file
17
nixos/tests/shiori.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
import ./make-test.nix ({ lib, ...}:
|
||||
|
||||
{
|
||||
name = "shiori";
|
||||
meta.maintainers = with lib.maintainers; [ minijackson ];
|
||||
|
||||
machine =
|
||||
{ ... }:
|
||||
{ services.shiori.enable = true; };
|
||||
|
||||
testScript = ''
|
||||
$machine->waitForUnit('shiori.service');
|
||||
$machine->waitForOpenPort('8080');
|
||||
$machine->succeed("curl --fail http://localhost:8080/");
|
||||
$machine->succeed("curl --fail --location http://localhost:8080/ | grep -qi shiori");
|
||||
'';
|
||||
})
|
22
pkgs/servers/web-apps/shiori/default.nix
Normal file
22
pkgs/servers/web-apps/shiori/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ stdenv, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "shiori";
|
||||
version = "1.5.0";
|
||||
|
||||
modSha256 = "142raxqh6mipw0dyhzgc8ha6vn74wdin25qrl1nkd68mpcvsbblg";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "go-shiori";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "13and7gh2882khqppwz3wwq44p7az4bfdfjvlnqcpqyi8xa28pmq";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Simple bookmark manager built with Go";
|
||||
homepage = "https://github.com/go-shiori/shiori";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ minijackson ];
|
||||
};
|
||||
}
|
|
@ -15390,6 +15390,8 @@ in
|
|||
|
||||
shaarli-material = callPackage ../servers/web-apps/shaarli/material-theme.nix { };
|
||||
|
||||
shiori = callPackage ../servers/web-apps/shiori { };
|
||||
|
||||
matomo = callPackage ../servers/web-apps/matomo { };
|
||||
|
||||
axis2 = callPackage ../servers/http/tomcat/axis2 { };
|
||||
|
|
Loading…
Reference in a new issue