matterbridge
This commit is contained in:
parent
42d63b428a
commit
2693fbf8cb
5 changed files with 109 additions and 8 deletions
|
@ -14,6 +14,7 @@
|
|||
./webpass.nix
|
||||
./nginx.nix
|
||||
./dokuwiki.nix
|
||||
./matterbridge.nix
|
||||
];
|
||||
|
||||
networking.hostName = "hackens-org"; # Define your hostname.
|
||||
|
@ -21,7 +22,7 @@
|
|||
# dokuwiki overlay
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
dokuwiki = self.pkgs.callPackage ../../shared/dokuwiki.nix {};
|
||||
dokuwiki = self.pkgs.callPackage ../../shared/dokuwiki.nix { };
|
||||
})
|
||||
];
|
||||
|
||||
|
|
56
hosts/org/matterbridge.nix
Normal file
56
hosts/org/matterbridge.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
port = 52187;
|
||||
configFile = pkgs.writeText "metterbridge.toml" ''
|
||||
[irc]
|
||||
[irc.ulminfo]
|
||||
Server="ulminfo.fr:6697" # Ou ens.wtf tu choisis.
|
||||
Nick="roBOT"
|
||||
UseTLS=true
|
||||
Charset="utf8"
|
||||
PrefixMessagesWithNick=true
|
||||
RemoteNickFormat="<{NICK}> "
|
||||
|
||||
[mattermost]
|
||||
[mattermost.merle]
|
||||
WebhookBindAddress="0.0.0.0:${builtins.toString port}"
|
||||
PrefixMessagesWithNick=false
|
||||
RemoteNickFormat="{NICK}"
|
||||
|
||||
[[gateway]]
|
||||
name="hackens"
|
||||
enable=true
|
||||
[[gateway.inout]]
|
||||
account="irc.ulminfo"
|
||||
channel="#hackens"
|
||||
[[gateway.inout]]
|
||||
account="mattermost.merle"
|
||||
channel="town-square"
|
||||
'';
|
||||
in
|
||||
{
|
||||
systemd.services.matterbridge = {
|
||||
description = "Matterbridge chat platform bridge";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
script = ''
|
||||
${pkgs.matterbridge}/bin/matterbridge -conf ${configFile}
|
||||
'';
|
||||
|
||||
|
||||
serviceConfig = {
|
||||
User = "matterbridge";
|
||||
Group = "matterbridge";
|
||||
Restart = "always";
|
||||
RestartSec = "10";
|
||||
EnvironmentFile = config.age.secrets."matterbridge-env".path;
|
||||
};
|
||||
};
|
||||
users.users.matterbridge = {
|
||||
isSystemUser = true;
|
||||
group = "matterbridge";
|
||||
|
||||
};
|
||||
users.groups.matterbridge = { };
|
||||
networking.firewall.allowedTCPPorts = [ port ];
|
||||
}
|
|
@ -1,4 +1,11 @@
|
|||
{ ... }: {
|
||||
imports = [ <agenix/modules/age.nix> ];
|
||||
age.secrets."wikiOpenID".file = ./wiki-openID.age;
|
||||
age.secrets."wikiOpenID" = {
|
||||
file = ./wiki-openID.age;
|
||||
owner = "dokuwiki";
|
||||
};
|
||||
age.secrets."matterbridge-env" = {
|
||||
file = ./matterbridge-env.age;
|
||||
owner = "matterbridge";
|
||||
};
|
||||
}
|
||||
|
|
33
secrets/matterbridge-env.age
Normal file
33
secrets/matterbridge-env.age
Normal file
|
@ -0,0 +1,33 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 JGx7Ng udxfs+mQbihD5fPzAn5ni8YEJVZpy4WWsJD6lCtRC1A
|
||||
KZ5YX6e6z8SWnlDlx8vA4w0YUqtzBoYwInFKuqZz7d4
|
||||
-> ssh-ed25519 kXobKQ A6vHdLfZyEBJgYx41cinKBs0x0TaP331o5RMiARyeUw
|
||||
BneTkDar5nxv6oZ9sCtIlrknPCNTN+/+/PF0IL+Sd48
|
||||
-> ssh-ed25519 7hZk0g Zb6uedun2Z3ZKxFefDyPbro7hiBf9I0MBT4JqBNVKVQ
|
||||
iowidJUNNg/i8PJzr2QaQ1CtiGuhqLiMEgAZOnNhOpg
|
||||
-> ssh-rsa krWCLQ
|
||||
YTtOm6+MDPBNKQRhBZfhNqJV1qLJ5UDV5UdBnU0NzQz6k0IB2wowKcbgsmeoTPAo
|
||||
y8Ngqaj73LsttzvBtFEQkGyfx/uN5YheUj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vwGe5ABo2JAKlZUpbHD3
|
||||
gkvFvQSHMj94zoHmK7a7pnp73QZ5uwtqUuPpm3xclXIZFDkWJQ
|
||||
--- dqYRV0DCgBAI4LSzwaka+j17Ov0J27IQLQzxEcygRZA
|
||||
|
||||
YU\ÔÓû
÷8ÔÍ•/»à´0FS”
|
||||
“΂xøëÝMZµfŒúY~C`迳$7ÌdÇš<i–·"<11>¶"éGLžHò1“]ÜÄw)¦¾J^G‰ªwŒ¡3èýZ<C3BD>ŬeÄâv‚I…”rÅwH%ÄC;6>Êä7ŠBÀ÷Øž¤ÀkF~w®ÞX
|
|
@ -1,10 +1,14 @@
|
|||
let
|
||||
lib = (import <nixpkgs> { }).lib;
|
||||
readPubkeys = user:
|
||||
readpubkeys = user:
|
||||
builtins.filter (k: k != "")
|
||||
(lib.splitString "\n" (builtins.readFile (../pubkeys + "/${user}.keys")));
|
||||
in {
|
||||
"wiki-openID.age".publicKeys = (readPubkeys "sinavir")
|
||||
++ (readPubkeys "hackens-host") ++ (readPubkeys "raito")
|
||||
++ (readPubkeys "gdd") ++ (readPubkeys "backslash");
|
||||
in
|
||||
{
|
||||
"wiki-openid.age".publicKeys = (readpubkeys "sinavir")
|
||||
++ (readpubkeys "hackens-host") ++ (readpubkeys "raito")
|
||||
++ (readpubkeys "gdd") ++ (readpubkeys "backslash");
|
||||
"matterbridge-env.age".publicKeys = (readpubkeys "sinavir")
|
||||
++ (readpubkeys "hackens-host") ++ (readpubkeys "raito")
|
||||
++ (readpubkeys "gdd") ++ (readpubkeys "backslash");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue