thelounge: init at 3.0.1 (#51947)

thelounge: init at 3.0.1
This commit is contained in:
Silvan Mosberger 2019-07-23 13:45:43 +02:00 committed by GitHub
commit 8403187566
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 1201 additions and 459 deletions

View file

@ -692,6 +692,7 @@
./services/networking/tcpcrypt.nix
./services/networking/teamspeak3.nix
./services/networking/tedicross.nix
./services/networking/thelounge.nix
./services/networking/tinc.nix
./services/networking/tinydns.nix
./services/networking/tftpd.nix

View file

@ -0,0 +1,75 @@
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.services.thelounge;
dataDir = "/var/lib/thelounge";
configJsData = "module.exports = " + builtins.toJSON (
{ private = cfg.private; port = cfg.port; } // cfg.extraConfig
);
in {
options.services.thelounge = {
enable = mkEnableOption "The Lounge web IRC client";
private = mkOption {
type = types.bool;
default = false;
description = ''
Make your The Lounge instance private. You will need to configure user
accounts by using the (<command>thelounge</command>) command or by adding
entries in <filename>${dataDir}/users</filename>. You might need to restart
The Lounge after making changes to the state directory.
'';
};
port = mkOption {
type = types.port;
default = 9000;
description = "TCP port to listen on for http connections.";
};
extraConfig = mkOption {
default = {};
type = types.attrs;
example = literalExample ''{
reverseProxy = true;
defaults = {
name = "Your Network";
host = "localhost";
port = 6697;
};
}'';
description = ''
The Lounge's <filename>config.js</filename> contents as attribute set (will be
converted to JSON to generate the configuration file).
The options defined here will be merged to the default configuration file.
Note: In case of duplicate configuration, options from <option>extraConfig</option> have priority.
Documentation: <link xlink:href="https://thelounge.chat/docs/server/configuration" />
'';
};
};
config = mkIf cfg.enable {
users.users.thelounge = {
description = "thelounge service user";
group = "thelounge";
};
users.groups.thelounge = {};
systemd.services.thelounge = {
description = "The Lounge web IRC client";
wantedBy = [ "multi-user.target" ];
environment = { THELOUNGE_HOME = dataDir; };
preStart = "ln -sf ${pkgs.writeText "config.js" configJsData} ${dataDir}/config.js";
serviceConfig = {
User = "thelounge";
StateDirectory = baseNameOf dataDir;
ExecStart = "${pkgs.thelounge}/bin/thelounge start";
};
};
environment.systemPackages = [ pkgs.thelounge ];
};
}

View file

@ -125,4 +125,8 @@ nodePackages // {
nodePackages.node-pre-gyp
];
};
thelounge = nodePackages.thelounge.override {
buildInputs = [ nodePackages.node-pre-gyp ];
};
}

View file

@ -127,6 +127,7 @@
, "textlint-rule-terminology"
, "textlint-rule-unexpanded-acronym"
, "textlint-rule-write-good"
, "thelounge"
, "three"
, "tiddlywiki"
, "triton"

File diff suppressed because it is too large Load diff

View file

@ -13,13 +13,13 @@ let
sha512 = "nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==";
};
};
"ajv-6.10.0" = {
"ajv-6.10.2" = {
name = "ajv";
packageName = "ajv";
version = "6.10.0";
version = "6.10.2";
src = fetchurl {
url = "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz";
sha512 = "nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==";
url = "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz";
sha512 = "TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==";
};
};
"ansi-regex-2.1.1" = {
@ -256,13 +256,13 @@ let
sha1 = "1b681c21ff84033c826543090689420d187151dc";
};
};
"chownr-1.1.1" = {
"chownr-1.1.2" = {
name = "chownr";
packageName = "chownr";
version = "1.1.1";
version = "1.1.2";
src = fetchurl {
url = "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz";
sha512 = "j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==";
url = "https://registry.npmjs.org/chownr/-/chownr-1.1.2.tgz";
sha512 = "GkfeAQh+QNy3wquu9oIZr6SS5x7wGdSgNQvD10X3r+AZr1Oys22HW8kAmDMvNg2+Dm0TeGaEuO8gFwdBXxwO8A==";
};
};
"class-utils-0.3.6" = {
@ -1786,6 +1786,15 @@ let
sha512 = "Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==";
};
};
"safe-buffer-5.2.0" = {
name = "safe-buffer";
packageName = "safe-buffer";
version = "5.2.0";
src = fetchurl {
url = "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz";
sha512 = "fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==";
};
};
"safe-regex-1.1.0" = {
name = "safe-regex";
packageName = "safe-regex";
@ -1957,13 +1966,13 @@ let
sha512 = "Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==";
};
};
"spdx-license-ids-3.0.4" = {
"spdx-license-ids-3.0.5" = {
name = "spdx-license-ids";
packageName = "spdx-license-ids";
version = "3.0.4";
version = "3.0.5";
src = fetchurl {
url = "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz";
sha512 = "7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==";
url = "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz";
sha512 = "J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==";
};
};
"split-string-3.1.0" = {
@ -2591,7 +2600,7 @@ in
};
dependencies = [
sources."abbrev-1.1.1"
sources."ajv-6.10.0"
sources."ajv-6.10.2"
sources."ansi-regex-2.1.1"
sources."aproba-1.2.0"
sources."are-we-there-yet-1.1.5"
@ -2607,7 +2616,7 @@ in
sources."buffer-from-1.1.1"
sources."builtins-1.0.3"
sources."caseless-0.12.0"
sources."chownr-1.1.1"
sources."chownr-1.1.2"
sources."code-point-at-1.1.0"
sources."combined-stream-1.0.8"
sources."concat-map-0.0.1"
@ -2710,12 +2719,16 @@ in
sources."psl-1.2.0"
sources."punycode-2.1.1"
sources."qs-6.5.2"
sources."readable-stream-2.3.6"
(sources."readable-stream-2.3.6" // {
dependencies = [
sources."safe-buffer-5.1.2"
];
})
sources."request-2.88.0"
sources."resolve-1.11.1"
sources."retry-0.10.1"
sources."rimraf-2.6.3"
sources."safe-buffer-5.1.2"
sources."safe-buffer-5.2.0"
sources."safer-buffer-2.1.2"
sources."semver-6.1.3"
sources."set-blocking-2.0.0"
@ -2725,11 +2738,15 @@ in
sources."spdx-correct-3.1.0"
sources."spdx-exceptions-2.2.0"
sources."spdx-expression-parse-3.0.0"
sources."spdx-license-ids-3.0.4"
sources."spdx-license-ids-3.0.5"
sources."sshpk-1.16.1"
sources."ssri-5.3.0"
sources."string-width-1.0.2"
sources."string_decoder-1.1.1"
(sources."string_decoder-1.1.1" // {
dependencies = [
sources."safe-buffer-5.1.2"
];
})
sources."strip-ansi-3.0.1"
sources."tar-4.4.10"
sources."temp-0.9.0"

File diff suppressed because it is too large Load diff

View file

@ -6262,6 +6262,8 @@ in
theharvester = callPackage ../tools/security/theharvester { };
inherit (nodePackages) thelounge;
thefuck = python3Packages.callPackage ../tools/misc/thefuck { };
thin-provisioning-tools = callPackage ../tools/misc/thin-provisioning-tools { };