summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2021-05-25 09:50:26 +0200
committermakefu <github@syntax-fehler.de>2021-05-25 09:50:26 +0200
commitc9a67885666bc85e0c5340d78c38cde279a1eac1 (patch)
tree188062a30af7e1bf654068f80472f956af934cd3 /krebs
parentba58fde0957b5801322ba30e82efd0575d9a7b7b (diff)
parentb1437a3b1761a58cfa8d601c20da0a0f13e3d795 (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'krebs')
-rw-r--r--krebs/2configs/ircd.nix4
-rw-r--r--krebs/2configs/reaktor2.nix17
-rw-r--r--krebs/3modules/default.nix2
-rw-r--r--krebs/3modules/hidden-ssh.nix2
-rw-r--r--krebs/3modules/lass/default.nix2
-rw-r--r--krebs/3modules/lass/ssh/android.ed255191
-rw-r--r--krebs/3modules/lass/ssh/android.rsa1
-rw-r--r--krebs/3modules/solanum.nix (renamed from krebs/3modules/charybdis.nix)49
-rw-r--r--krebs/5pkgs/simple/solanum/default.nix62
-rw-r--r--krebs/5pkgs/simple/solanum/dont-create-logdir.patch14
-rw-r--r--krebs/nixpkgs-unstable.json8
-rw-r--r--krebs/nixpkgs.json8
12 files changed, 129 insertions, 41 deletions
diff --git a/krebs/2configs/ircd.nix b/krebs/2configs/ircd.nix
index 3ef2e7d2b..d4ac9e42a 100644
--- a/krebs/2configs/ircd.nix
+++ b/krebs/2configs/ircd.nix
@@ -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
diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix
index 473028f95..2823aabef 100644
--- a/krebs/2configs/reaktor2.nix
+++ b/krebs/2configs/reaktor2.nix
@@ -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";
diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix
index 85d27459b..e75afad1d 100644
--- a/krebs/3modules/default.nix
+++ b/krebs/3modules/default.nix
@@ -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
diff --git a/krebs/3modules/hidden-ssh.nix b/krebs/3modules/hidden-ssh.nix
index f497de451..1e56e62f9 100644
--- a/krebs/3modules/hidden-ssh.nix
+++ b/krebs/3modules/hidden-ssh.nix
@@ -17,7 +17,7 @@ let
};
server = mkOption {
type = types.str;
- default = "irc.freenode.org";
+ default = "irc.hackint.org";
};
message = mkOption {
type = types.str;
diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix
index d29988be2..cb68cff18 100644
--- a/krebs/3modules/lass/default.nix
+++ b/krebs/3modules/lass/default.nix
@@ -807,7 +807,7 @@ in {
};
lass-android = {
mail = "lassulus@gmail.com";
- pubkey = builtins.readFile ./ssh/android.rsa;
+ pubkey = builtins.readFile ./ssh/android.ed25519;
};
};
}
diff --git a/krebs/3modules/lass/ssh/android.ed25519 b/krebs/3modules/lass/ssh/android.ed25519
new file mode 100644
index 000000000..44f424809
--- /dev/null
+++ b/krebs/3modules/lass/ssh/android.ed25519
@@ -0,0 +1 @@
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG4CYC/CwtLf3U+pTjIvAormpJCvauVUBdHXuD7n2wc3
diff --git a/krebs/3modules/lass/ssh/android.rsa b/krebs/3modules/lass/ssh/android.rsa
deleted file mode 100644
index 21b8e015e..000000000
--- a/krebs/3modules/lass/ssh/android.rsa
+++ /dev/null
@@ -1 +0,0 @@
-ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEpP5YExkzwfmn7GpvnmZZRx1S+jmZyYrOf7b5cZZnbF
diff --git a/krebs/3modules/charybdis.nix b/krebs/3modules/solanum.nix
index 038d79dd0..9094d1003 100644
--- a/krebs/3modules/charybdis.nix
+++ b/krebs/3modules/solanum.nix
@@ -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;
})
]);
}
diff --git a/krebs/5pkgs/simple/solanum/default.nix b/krebs/5pkgs/simple/solanum/default.nix
new file mode 100644
index 000000000..3fa765c94
--- /dev/null
+++ b/krebs/5pkgs/simple/solanum/default.nix
@@ -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;
+ };
+}
diff --git a/krebs/5pkgs/simple/solanum/dont-create-logdir.patch b/krebs/5pkgs/simple/solanum/dont-create-logdir.patch
new file mode 100644
index 000000000..e348dd7b8
--- /dev/null
+++ b/krebs/5pkgs/simple/solanum/dont-create-logdir.patch
@@ -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
diff --git a/krebs/nixpkgs-unstable.json b/krebs/nixpkgs-unstable.json
index da50df9c9..fe46ec022 100644
--- a/krebs/nixpkgs-unstable.json
+++ b/krebs/nixpkgs-unstable.json
@@ -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
diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json
index 7a16fab63..06b865cc8 100644
--- a/krebs/nixpkgs.json
+++ b/krebs/nixpkgs.json
@@ -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