summaryrefslogtreecommitdiffstats
path: root/krebs/3modules
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/3modules')
-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
6 files changed, 26 insertions, 31 deletions
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;
})
]);
}