summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2021-10-24 18:25:11 +0200
committerlassulus <lassulus@lassul.us>2021-10-24 18:25:51 +0200
commit4fa8f74fc049e6856cb0f9cedbba3ca26ca1e695 (patch)
tree283d035bd972da802da618b3a4d84709339af768 /krebs
parent566951d3f0aa9fcc64df3ef5d7bf1fcf0eff04ab (diff)
solanum: use upstream service
Diffstat (limited to 'krebs')
-rw-r--r--krebs/2configs/ircd.nix6
-rw-r--r--krebs/3modules/default.nix1
-rw-r--r--krebs/3modules/solanum.nix104
3 files changed, 3 insertions, 108 deletions
diff --git a/krebs/2configs/ircd.nix b/krebs/2configs/ircd.nix
index d26aa5962..904878731 100644
--- a/krebs/2configs/ircd.nix
+++ b/krebs/2configs/ircd.nix
@@ -1,13 +1,13 @@
-{ config, pkgs, ... }:
+{ config, pkgs, lib, ... }:
{
networking.firewall.allowedTCPPorts = [
6667 6669
];
- systemd.services.solanum.serviceConfig.LimitNOFILE = 16384;
+ systemd.services.solanum.serviceConfig.LimitNOFILE = lib.mkForce 16384;
- krebs.solanum = {
+ services.solanum = {
enable = true;
motd = ''
hello
diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix
index 149995a23..24b17487b 100644
--- a/krebs/3modules/default.nix
+++ b/krebs/3modules/default.nix
@@ -50,7 +50,6 @@ let
./secret.nix
./setuid.nix
./shadow.nix
- ./solanum.nix
./sync-containers.nix
./tinc.nix
./tinc_graphs.nix
diff --git a/krebs/3modules/solanum.nix b/krebs/3modules/solanum.nix
deleted file mode 100644
index 9094d1003..000000000
--- a/krebs/3modules/solanum.nix
+++ /dev/null
@@ -1,104 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-let
- inherit (lib) mkEnableOption mkIf mkOption singleton types;
- inherit (pkgs) coreutils solanum;
- cfg = config.krebs.solanum;
-
- configFile = pkgs.writeText "solanum.conf" ''
- ${cfg.config}
- '';
-in
-
-{
-
- ###### interface
-
- options = {
-
- krebs.solanum = {
-
- enable = mkEnableOption "Solanum IRC daemon";
-
- config = mkOption {
- type = types.str;
- description = ''
- Solanum IRC daemon configuration file.
- '';
- };
-
- statedir = mkOption {
- type = types.path;
- default = "/var/lib/solanum";
- description = ''
- Location of the state directory of solanum.
- '';
- };
-
- user = mkOption {
- type = types.str;
- default = "ircd";
- description = ''
- Solanum IRC daemon user.
- '';
- };
-
- group = mkOption {
- type = types.str;
- default = "ircd";
- description = ''
- Solanum IRC daemon group.
- '';
- };
-
- motd = mkOption {
- type = types.nullOr types.lines;
- default = null;
- description = ''
- Solanum MOTD text.
-
- Solanum will read its MOTD from /etc/solanum/ircd.motd .
- If set, the value of this option will be written to this path.
- '';
- };
-
- };
-
- };
-
-
- ###### implementation
-
- config = mkIf cfg.enable (lib.mkMerge [
- {
- users.users.${cfg.user} = {
- description = "Solanum IRC daemon user";
- uid = config.ids.uids.ircd;
- group = cfg.group;
- };
-
- users.groups.${cfg.group} = {
- gid = config.ids.gids.ircd;
- };
-
- systemd.tmpfiles.rules = [
- "d ${cfg.statedir} - ${cfg.user} ${cfg.group} - -"
- ];
-
- systemd.services.solanum = {
- description = "Solanum IRC daemon";
- wantedBy = [ "multi-user.target" ];
- serviceConfig = {
- ExecStart = "${solanum}/bin/solanum -foreground -logfile /dev/stdout -configfile ${configFile} -pidfile ${cfg.statedir}/ircd.pid";
- Group = cfg.group;
- User = cfg.user;
- };
- };
-
- }
-
- (mkIf (cfg.motd != null) {
- environment.etc."solanum/ircd.motd".text = cfg.motd;
- })
- ]);
-}