From 2280c39d3e37769c8eb2159f6e934211eb82b778 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 29 Dec 2021 16:52:23 +0100 Subject: [PATCH 1/2] krebs.systemd: don't offer to reload services Because new credentials won't be available after reloading, only after restarting. --- krebs/3modules/systemd.nix | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/krebs/3modules/systemd.nix b/krebs/3modules/systemd.nix index 294f80a3c..194e8b24a 100644 --- a/krebs/3modules/systemd.nix +++ b/krebs/3modules/systemd.nix @@ -5,18 +5,18 @@ default = {}; type = lib.types.attrsOf (lib.types.submodule { options = { - ifCredentialsChange = lib.mkOption { - default = "restart"; + restartIfCredentialsChange = lib.mkOption { + # Enabling this by default only makes sense here as the user already + # bothered to write down krebs.systemd.services.* = {}. If this + # functionality gets upstreamed to systemd.services, restarting + # should be disabled by default. + default = true; description = '' - Whether to reload or restart the service whenever any its - credentials change. Only credentials with an absolute path in - LoadCredential= are supported. + Whether to restart the service whenever any of its credentials + change. Only credentials with an absolute path in LoadCredential= + are supported. ''; - type = lib.types.enum [ - "reload" - "restart" - null - ]; + type = lib.types.bool; }; }; }); @@ -40,7 +40,7 @@ lib.nameValuePair "trigger-${lib.systemd.encodeName serviceName}" { serviceConfig = { Type = "oneshot"; - ExecStart = "${pkgs.systemd}/bin/systemctl ${cfg.ifCredentialsChange} ${lib.shell.escape serviceName}"; + ExecStart = "${pkgs.systemd}/bin/systemctl restart ${lib.shell.escape serviceName}"; }; } ) config.krebs.systemd.services; From bf319b980469497a75b8a74d0070d0ee1f6b2c09 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 29 Dec 2021 20:53:38 +0100 Subject: [PATCH 2/2] ircaids: 1.2.0 -> 1.3.0 --- krebs/5pkgs/simple/ircaids/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/krebs/5pkgs/simple/ircaids/default.nix b/krebs/5pkgs/simple/ircaids/default.nix index cffd4aa76..22281161d 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.2.0"; + version = "1.3.0"; src = pkgs.fetchgit { url = "https://cgit.krebsco.de/ircaids"; rev = "refs/tags/${version}"; - sha256 = "049ln54llfrn99q0pzwlb7iaz4igd4f3n4rb6mpc9irsy32bv3qg"; + sha256 = "128ryfl0prpc1789hhqw2mq16zy3jd82a24k6hkw7nj71hifzr3a"; }; buildPhase = null;