mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 07:01:54 +00:00
Merge pull request #83780 from hax404/robustirc-bridge
robustirc-bridge: init at 1.8
This commit is contained in:
commit
a081e99e41
@ -718,6 +718,7 @@
|
||||
./services/networking/rdnssd.nix
|
||||
./services/networking/redsocks.nix
|
||||
./services/networking/resilio.nix
|
||||
./services/networking/robustirc-bridge.nix
|
||||
./services/networking/rpcbind.nix
|
||||
./services/networking/rxe.nix
|
||||
./services/networking/sabnzbd.nix
|
||||
|
47
nixos/modules/services/networking/robustirc-bridge.nix
Normal file
47
nixos/modules/services/networking/robustirc-bridge.nix
Normal file
@ -0,0 +1,47 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.robustirc-bridge;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.robustirc-bridge = {
|
||||
enable = mkEnableOption "RobustIRC bridge";
|
||||
|
||||
extraFlags = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
description = ''Extra flags passed to the <command>robustirc-bridge</command> command. See <link xlink:href="https://robustirc.net/docs/adminguide.html#_bridge">RobustIRC Documentation</link> or robustirc-bridge(1) for details.'';
|
||||
example = [
|
||||
"-network robustirc.net"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.robustirc-bridge = {
|
||||
description = "RobustIRC bridge";
|
||||
documentation = [
|
||||
"man:robustirc-bridge(1)"
|
||||
"https://robustirc.net/"
|
||||
];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
ExecStart = "${pkgs.robustirc-bridge}/bin/robustirc-bridge ${concatStringsSep " " cfg.extraFlags}";
|
||||
Restart = "on-failure";
|
||||
|
||||
# Hardening
|
||||
PrivateDevices = true;
|
||||
ProtectSystem = true;
|
||||
ProtectHome = true;
|
||||
PrivateTmp = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -298,6 +298,7 @@ in
|
||||
redis = handleTest ./redis.nix {};
|
||||
redmine = handleTest ./redmine.nix {};
|
||||
restic = handleTest ./restic.nix {};
|
||||
robustirc-bridge = handleTest ./robustirc-bridge.nix {};
|
||||
roundcube = handleTest ./roundcube.nix {};
|
||||
rspamd = handleTest ./rspamd.nix {};
|
||||
rss2email = handleTest ./rss2email.nix {};
|
||||
|
29
nixos/tests/robustirc-bridge.nix
Normal file
29
nixos/tests/robustirc-bridge.nix
Normal file
@ -0,0 +1,29 @@
|
||||
import ./make-test-python.nix ({ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "robustirc-bridge";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ hax404 ];
|
||||
};
|
||||
|
||||
nodes =
|
||||
{ bridge =
|
||||
{ services.robustirc-bridge = {
|
||||
enable = true;
|
||||
extraFlags = [
|
||||
"-listen localhost:6667"
|
||||
"-network example.com"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
start_all()
|
||||
|
||||
bridge.wait_for_unit("robustirc-bridge.service")
|
||||
bridge.wait_for_open_port(1080)
|
||||
bridge.wait_for_open_port(6667)
|
||||
'';
|
||||
})
|
29
pkgs/servers/irc/robustirc-bridge/default.nix
Normal file
29
pkgs/servers/irc/robustirc-bridge/default.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{ stdenv, buildGoModule, fetchFromGitHub, nixosTests }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "robustirc-bridge";
|
||||
version = "1.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "robustirc";
|
||||
repo = "bridge";
|
||||
rev = "v${version}";
|
||||
sha256 = "12jzil97147f978shdgm6whz7699db0shh0c1fzgrjh512dw502c";
|
||||
};
|
||||
|
||||
vendorSha256 = "0lm8j2iz0yysgi0bbh78ca629kb6sxvyy9al3aj2587hpvy79q85";
|
||||
|
||||
postInstall = ''
|
||||
install -D robustirc-bridge.1 $out/share/man/man1/robustirc-bridge.1
|
||||
'';
|
||||
|
||||
passthru.tests.robustirc-bridge = nixosTests.robustirc-bridge;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Bridge to robustirc.net-IRC-Network";
|
||||
homepage = "https://robustirc.net/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.hax404 ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
@ -22993,6 +22993,8 @@ in
|
||||
|
||||
prusa-slicer = callPackage ../applications/misc/prusa-slicer { };
|
||||
|
||||
robustirc-bridge = callPackage ../servers/irc/robustirc-bridge { };
|
||||
|
||||
sddm = libsForQt5.callPackage ../applications/display-managers/sddm { };
|
||||
|
||||
skrooge = libsForQt5.callPackage ../applications/office/skrooge {};
|
||||
|
Loading…
Reference in New Issue
Block a user