Merge remote-tracking branch 'lass/master'
This commit is contained in:
commit
c9a6788566
@ -5,9 +5,9 @@
|
||||
6667 6669
|
||||
];
|
||||
|
||||
systemd.services.charybdis.serviceConfig.LimitNOFILE = 16384;
|
||||
systemd.services.solanum.serviceConfig.LimitNOFILE = 16384;
|
||||
|
||||
krebs.charybdis = {
|
||||
krebs.solanum = {
|
||||
enable = true;
|
||||
motd = ''
|
||||
hello
|
||||
|
@ -122,6 +122,23 @@ in {
|
||||
};
|
||||
|
||||
krebs.reaktor2 = {
|
||||
hackint = {
|
||||
hostname = "irc.hackint.org";
|
||||
nick = "reaktor2|krebs";
|
||||
plugins = [
|
||||
{
|
||||
plugin = "register";
|
||||
config = {
|
||||
channels = [
|
||||
"#krebs"
|
||||
];
|
||||
};
|
||||
}
|
||||
systemPlugin
|
||||
];
|
||||
username = "reaktor2";
|
||||
port = "6697";
|
||||
};
|
||||
freenode = {
|
||||
hostname = "irc.freenode.org";
|
||||
nick = "reaktor2|krebs";
|
||||
|
@ -17,7 +17,6 @@ let
|
||||
./buildbot/slave.nix
|
||||
./build.nix
|
||||
./cachecache.nix
|
||||
./charybdis.nix
|
||||
./ci.nix
|
||||
./current.nix
|
||||
./dns.nix
|
||||
@ -52,6 +51,7 @@ let
|
||||
./secret.nix
|
||||
./setuid.nix
|
||||
./shadow.nix
|
||||
./solanum.nix
|
||||
./sync-containers.nix
|
||||
./tinc.nix
|
||||
./tinc_graphs.nix
|
||||
|
@ -17,7 +17,7 @@ let
|
||||
};
|
||||
server = mkOption {
|
||||
type = types.str;
|
||||
default = "irc.freenode.org";
|
||||
default = "irc.hackint.org";
|
||||
};
|
||||
message = mkOption {
|
||||
type = types.str;
|
||||
|
@ -807,7 +807,7 @@ in {
|
||||
};
|
||||
lass-android = {
|
||||
mail = "lassulus@gmail.com";
|
||||
pubkey = builtins.readFile ./ssh/android.rsa;
|
||||
pubkey = builtins.readFile ./ssh/android.ed25519;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
1
krebs/3modules/lass/ssh/android.ed25519
Normal file
1
krebs/3modules/lass/ssh/android.ed25519
Normal file
@ -0,0 +1 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG4CYC/CwtLf3U+pTjIvAormpJCvauVUBdHXuD7n2wc3
|
@ -1 +0,0 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEpP5YExkzwfmn7GpvnmZZRx1S+jmZyYrOf7b5cZZnbF
|
@ -2,10 +2,10 @@
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf mkOption singleton types;
|
||||
inherit (pkgs) coreutils charybdis;
|
||||
cfg = config.krebs.charybdis;
|
||||
inherit (pkgs) coreutils solanum;
|
||||
cfg = config.krebs.solanum;
|
||||
|
||||
configFile = pkgs.writeText "charybdis.conf" ''
|
||||
configFile = pkgs.writeText "solanum.conf" ''
|
||||
${cfg.config}
|
||||
'';
|
||||
in
|
||||
@ -16,22 +16,22 @@ in
|
||||
|
||||
options = {
|
||||
|
||||
krebs.charybdis = {
|
||||
krebs.solanum = {
|
||||
|
||||
enable = mkEnableOption "Charybdis IRC daemon";
|
||||
enable = mkEnableOption "Solanum IRC daemon";
|
||||
|
||||
config = mkOption {
|
||||
type = types.str;
|
||||
description = ''
|
||||
Charybdis IRC daemon configuration file.
|
||||
Solanum IRC daemon configuration file.
|
||||
'';
|
||||
};
|
||||
|
||||
statedir = mkOption {
|
||||
type = types.str;
|
||||
default = "/var/lib/charybdis";
|
||||
type = types.path;
|
||||
default = "/var/lib/solanum";
|
||||
description = ''
|
||||
Location of the state directory of charybdis.
|
||||
Location of the state directory of solanum.
|
||||
'';
|
||||
};
|
||||
|
||||
@ -39,7 +39,7 @@ in
|
||||
type = types.str;
|
||||
default = "ircd";
|
||||
description = ''
|
||||
Charybdis IRC daemon user.
|
||||
Solanum IRC daemon user.
|
||||
'';
|
||||
};
|
||||
|
||||
@ -47,7 +47,7 @@ in
|
||||
type = types.str;
|
||||
default = "ircd";
|
||||
description = ''
|
||||
Charybdis IRC daemon group.
|
||||
Solanum IRC daemon group.
|
||||
'';
|
||||
};
|
||||
|
||||
@ -55,9 +55,9 @@ in
|
||||
type = types.nullOr types.lines;
|
||||
default = null;
|
||||
description = ''
|
||||
Charybdis MOTD text.
|
||||
Solanum MOTD text.
|
||||
|
||||
Charybdis will read its MOTD from /etc/charybdis/ircd.motd .
|
||||
Solanum will read its MOTD from /etc/solanum/ircd.motd .
|
||||
If set, the value of this option will be written to this path.
|
||||
'';
|
||||
};
|
||||
@ -72,38 +72,33 @@ in
|
||||
config = mkIf cfg.enable (lib.mkMerge [
|
||||
{
|
||||
users.users.${cfg.user} = {
|
||||
description = "Charybdis IRC daemon user";
|
||||
description = "Solanum IRC daemon user";
|
||||
uid = config.ids.uids.ircd;
|
||||
group = cfg.group;
|
||||
};
|
||||
|
||||
users.groups.${cfg.group} = {
|
||||
name = cfg.group;
|
||||
gid = config.ids.gids.ircd;
|
||||
};
|
||||
|
||||
systemd.services.charybdis = {
|
||||
description = "Charybdis IRC daemon";
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${cfg.statedir} - ${cfg.user} ${cfg.group} - -"
|
||||
];
|
||||
|
||||
systemd.services.solanum = {
|
||||
description = "Solanum IRC daemon";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
environment = {
|
||||
BANDB_DBPATH = "${cfg.statedir}/ban.db";
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${charybdis}/bin/charybdis -foreground -logfile /dev/stdout -configfile ${configFile}";
|
||||
ExecStart = "${solanum}/bin/solanum -foreground -logfile /dev/stdout -configfile ${configFile} -pidfile ${cfg.statedir}/ircd.pid";
|
||||
Group = cfg.group;
|
||||
User = cfg.user;
|
||||
PermissionsStartOnly = true; # preStart needs to run with root permissions
|
||||
};
|
||||
preStart = ''
|
||||
${coreutils}/bin/mkdir -p ${cfg.statedir}
|
||||
${coreutils}/bin/chown ${cfg.user}:${cfg.group} ${cfg.statedir}
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
(mkIf (cfg.motd != null) {
|
||||
environment.etc."charybdis/ircd.motd".text = cfg.motd;
|
||||
environment.etc."solanum/ircd.motd".text = cfg.motd;
|
||||
})
|
||||
]);
|
||||
}
|
62
krebs/5pkgs/simple/solanum/default.nix
Normal file
62
krebs/5pkgs/simple/solanum/default.nix
Normal file
@ -0,0 +1,62 @@
|
||||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, autoreconfHook
|
||||
, pkg-config
|
||||
, bison
|
||||
, flex
|
||||
, openssl
|
||||
, sqlite
|
||||
, lksctp-tools
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "solanum";
|
||||
version = "unstable-2021-04-27";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "solanum-ircd";
|
||||
repo = pname;
|
||||
rev = "3ff5a12e75662e9a642f2a4364797bd361eb0925";
|
||||
sha256 = "14ywmfdv8cncbyg08y2qdis00kwg8lvhkcgj185is67smh0qf88f";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./dont-create-logdir.patch
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
"--enable-epoll"
|
||||
"--enable-ipv6"
|
||||
"--enable-openssl=${openssl.dev}"
|
||||
"--with-program-prefix=solanum-"
|
||||
"--localstatedir=/var/lib"
|
||||
"--with-rundir=/run"
|
||||
"--with-logdir=/var/log"
|
||||
] ++ lib.optionals (stdenv.isLinux) [
|
||||
"--enable-sctp=${lksctp-tools.out}/lib"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
bison
|
||||
flex
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
openssl
|
||||
sqlite
|
||||
];
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "An IRCd for unified networks";
|
||||
homepage = "https://github.com/solanum-ircd/solanum";
|
||||
license = licenses.gpl2Only;
|
||||
maintainers = with maintainers; [ hexa ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
14
krebs/5pkgs/simple/solanum/dont-create-logdir.patch
Normal file
14
krebs/5pkgs/simple/solanum/dont-create-logdir.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 19e7b396..21093521 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -35,9 +35,6 @@ include/serno.h:
|
||||
echo '#define DATECODE 0UL' >>include/serno.h; \
|
||||
fi
|
||||
|
||||
-install-data-hook:
|
||||
- test -d ${DESTDIR}${logdir} || mkdir -p ${DESTDIR}${logdir}
|
||||
-
|
||||
install-exec-hook:
|
||||
rm -f ${DESTDIR}${libdir}/*.la
|
||||
rm -f ${DESTDIR}${moduledir}/*.la
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"url": "https://github.com/NixOS/nixpkgs",
|
||||
"rev": "d1601a40c48426ae460eede1675fd1d6ee23e198",
|
||||
"date": "2021-05-13T06:19:30-04:00",
|
||||
"path": "/nix/store/6ifpfakc5am0dz25w40y2jgr4jhvr3iz-nixpkgs",
|
||||
"sha256": "00nl5b0ncqrcv6zr000dxk1jdvs7aj4s53njiyrh3sn78w1nghl6",
|
||||
"rev": "7a1fbc38a4b538450ac0d42aec8a3e513b4d723e",
|
||||
"date": "2021-05-16T12:16:31+02:00",
|
||||
"path": "/nix/store/iq2sy65gmwad2prm8lcdh6k5f7ywxci5-nixpkgs",
|
||||
"sha256": "0jg8dilsw0gr4jfshkk3wd50gddd11hvd836fxkw43m6m47885p7",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"url": "https://github.com/NixOS/nixpkgs",
|
||||
"rev": "21ff9308b75d448765f7c3704a1459a3d8e1c844",
|
||||
"date": "2021-05-14T13:57:54+00:00",
|
||||
"path": "/nix/store/xdd7c619y10n0fll9zk32fzd62yhil90-nixpkgs",
|
||||
"sha256": "0i32d1q5v9a0q4y1s010afn6vxljbliilq5cs63mk6sdw3kryj2b",
|
||||
"rev": "33824cdf8e4fec30c5b9ddc91b18991c3c375227",
|
||||
"date": "2021-05-18T19:08:44-04:00",
|
||||
"path": "/nix/store/s3f1q2a5hn60jdnz8h66z7yahrmzifin-nixpkgs",
|
||||
"sha256": "1sad0x998k3iid2vp57kv4skvf90yh4gbs61dv3p45c2qi3sql46",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
|
@ -223,7 +223,7 @@ in {
|
||||
systemd.services."reaktor2-the_playlist".serviceConfig.DynamicUser = mkForce false;
|
||||
|
||||
krebs.reaktor2.the_playlist = {
|
||||
hostname = "irc.freenode.org";
|
||||
hostname = "irc.hackint.org";
|
||||
port = "6697";
|
||||
useTLS = true;
|
||||
nick = "the_playlist";
|
||||
|
@ -19,8 +19,4 @@ self: super: {
|
||||
|
||||
nix-prefetch-github =
|
||||
self.python3Packages.callPackage ./nix-prefetch-github.nix {};
|
||||
|
||||
rxvt_unicode = self.callPackage ./rxvt_unicode.nix {
|
||||
rxvt_unicode = super.rxvt_unicode;
|
||||
};
|
||||
}
|
||||
|
@ -1,17 +0,0 @@
|
||||
{ fetchurl, rxvt_unicode }:
|
||||
rxvt_unicode.overrideAttrs (old: {
|
||||
patches = old.patches ++ [
|
||||
(fetchurl {
|
||||
name = "rxvt-unicode.cancel-running-selection-request.patch";
|
||||
url = "https://cgit.krebsco.de/rxvt-unicode/rawdiff/?id=15f3f94&id2=15f3f94^";
|
||||
sha256 = "1c7jq8phl85d2f581b4mc6fkmr2nv9n44qjjs4idi51sd2hs7sxw";
|
||||
})
|
||||
|
||||
# Fix segfault when calling editor-input from XMonad.
|
||||
(fetchurl {
|
||||
name = "rxvt-unicode.no-perl_destruct.patch";
|
||||
url = "https://cgit.krebsco.de/rxvt-unicode/rawdiff/?id=d63f96a&id2=d63f96a^";
|
||||
sha256 = "0fq9w4fq8mw05jk9bblzlh1x51m2cmk62xbc4c1mbiqagjmsi9f8";
|
||||
})
|
||||
];
|
||||
})
|
@ -5,5 +5,7 @@
|
||||
<!--
|
||||
mailto:tomislav@viljetic.de
|
||||
https://github.com/4z3
|
||||
irc://freenode.net/krebs
|
||||
irc://irc.hackint.org/tv,isnick
|
||||
irc://irc.libera.chat/tv,isnick
|
||||
irc://chat.freenode.net/tv,isnick
|
||||
-->
|
||||
|
Loading…
Reference in New Issue
Block a user