Merge remote-tracking branch 'ni/master'

This commit is contained in:
lassulus 2022-01-02 22:54:07 +01:00
commit bb4fdd13a4
2 changed files with 13 additions and 13 deletions
krebs
3modules
5pkgs/simple/ircaids

View file

@ -5,18 +5,18 @@
default = {}; default = {};
type = lib.types.attrsOf (lib.types.submodule { type = lib.types.attrsOf (lib.types.submodule {
options = { options = {
ifCredentialsChange = lib.mkOption { restartIfCredentialsChange = lib.mkOption {
default = "restart"; # 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 = '' description = ''
Whether to reload or restart the service whenever any its Whether to restart the service whenever any of its credentials
credentials change. Only credentials with an absolute path in change. Only credentials with an absolute path in LoadCredential=
LoadCredential= are supported. are supported.
''; '';
type = lib.types.enum [ type = lib.types.bool;
"reload"
"restart"
null
];
}; };
}; };
}); });
@ -40,7 +40,7 @@
lib.nameValuePair "trigger-${lib.systemd.encodeName serviceName}" { lib.nameValuePair "trigger-${lib.systemd.encodeName serviceName}" {
serviceConfig = { serviceConfig = {
Type = "oneshot"; 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; ) config.krebs.systemd.services;

View file

@ -2,12 +2,12 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "ircaids"; pname = "ircaids";
version = "1.2.0"; version = "1.3.0";
src = pkgs.fetchgit { src = pkgs.fetchgit {
url = "https://cgit.krebsco.de/ircaids"; url = "https://cgit.krebsco.de/ircaids";
rev = "refs/tags/${version}"; rev = "refs/tags/${version}";
sha256 = "049ln54llfrn99q0pzwlb7iaz4igd4f3n4rb6mpc9irsy32bv3qg"; sha256 = "128ryfl0prpc1789hhqw2mq16zy3jd82a24k6hkw7nj71hifzr3a";
}; };
buildPhase = null; buildPhase = null;