summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2021-12-29 00:20:31 +0100
committerlassulus <lassulus@lassul.us>2021-12-29 00:20:31 +0100
commitd3c3f1551f071dc610c847c6656aff455b21a4ff (patch)
tree576455a9a941682764ad7555691aa4654dd9a9ea /krebs
parent3bec49053d491de9ea28164f3424d04e138e43f4 (diff)
parent687948cfe5154e03f93886dd27dc30c7910ba754 (diff)
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'krebs')
-rw-r--r--krebs/3modules/ergo.nix38
-rw-r--r--krebs/5pkgs/simple/ircaids/default.nix4
2 files changed, 10 insertions, 32 deletions
diff --git a/krebs/3modules/ergo.nix b/krebs/3modules/ergo.nix
index 74e621fcb..0ce0345d8 100644
--- a/krebs/3modules/ergo.nix
+++ b/krebs/3modules/ergo.nix
@@ -1,24 +1,8 @@
-{ config, lib, options, pkgs, ... }:
-
-let
- inherit (lib) mkEnableOption mkIf mkOption types;
- inherit (pkgs) coreutils ergo;
- cfg = config.krebs.ergo;
-
- configFile = pkgs.writeText "ergo.conf" (builtins.toJSON cfg.config);
-in
-
-{
-
- ###### interface
-
+{ config, lib, options, pkgs, ... }: {
options = {
-
krebs.ergo = {
-
- enable = mkEnableOption "Ergo IRC daemon";
-
- config = mkOption {
+ enable = lib.mkEnableOption "Ergo IRC daemon";
+ config = lib.mkOption {
type = (pkgs.formats.json {}).type;
description = ''
Ergo IRC daemon configuration file.
@@ -74,28 +58,22 @@ in
};
};
};
-
};
-
};
-
-
- ###### implementation
-
- config = mkIf cfg.enable ({
-
+ config = let
+ cfg = config.krebs.ergo;
+ configFile = pkgs.writeJSON "ergo.conf" cfg.config;
+ in lib.mkIf cfg.enable ({
krebs.ergo.config =
lib.mapAttrsRecursive (_: lib.mkDefault) options.krebs.ergo.config.default;
-
systemd.services.ergo = {
description = "Ergo IRC daemon";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
- ExecStart = "${ergo}/bin/ergo run --conf ${configFile}";
+ ExecStart = "${pkgs.ergo}/bin/ergo run --conf ${configFile}";
DynamicUser = true;
StateDirectory = "ergo";
};
};
-
});
}
diff --git a/krebs/5pkgs/simple/ircaids/default.nix b/krebs/5pkgs/simple/ircaids/default.nix
index d16622c2d..cffd4aa76 100644
--- a/krebs/5pkgs/simple/ircaids/default.nix
+++ b/krebs/5pkgs/simple/ircaids/default.nix
@@ -2,12 +2,12 @@
stdenv.mkDerivation rec {
pname = "ircaids";
- version = "1.1.0";
+ version = "1.2.0";
src = pkgs.fetchgit {
url = "https://cgit.krebsco.de/ircaids";
rev = "refs/tags/${version}";
- sha256 = "05zd5dhsif00q8s1g5vzjd6x9n0c806nhfbdcgjdfgfy1j3kygyq";
+ sha256 = "049ln54llfrn99q0pzwlb7iaz4igd4f3n4rb6mpc9irsy32bv3qg";
};
buildPhase = null;