summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/systemd.nix
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/3modules/systemd.nix')
-rw-r--r--krebs/3modules/systemd.nix12
1 files changed, 7 insertions, 5 deletions
diff --git a/krebs/3modules/systemd.nix b/krebs/3modules/systemd.nix
index 57620155..fc92da12 100644
--- a/krebs/3modules/systemd.nix
+++ b/krebs/3modules/systemd.nix
@@ -1,5 +1,7 @@
{ config, pkgs, lib, ... }: let {
+ slib = import ../../lib/lib.nix { inherit lib; };
+
body.options.krebs.systemd.services = lib.mkOption {
default = {};
type = lib.types.attrsOf (lib.types.submodule (cfg_: let
@@ -12,14 +14,14 @@
lib.sort
lib.lessThan
(lib.filter
- pkgs.stockholm.lib.types.absolute-pathname.check
+ slib.types.absolute-pathname.check
(map
- (pkgs.stockholm.lib.compose [ pkgs.stockholm.lib.maybeHead (pkgs.stockholm.lib.match "[^:]*:(.*)") ])
+ (slib.compose [ slib.maybeHead (builtins.match "[^:]*:(.*)") ])
(lib.toList cfg.serviceConfig.LoadCredential)));
readOnly = true;
};
credentialUnitName = lib.mkOption {
- default = "trigger-${pkgs.stockholm.lib.systemd.encodeName serviceName}";
+ default = "trigger-${slib.systemd.encodeName serviceName}";
readOnly = true;
};
restartIfCredentialsChange = lib.mkOption {
@@ -53,7 +55,7 @@
pkgs.systemd
]}
- cache=/var/lib/credentials/${pkgs.stockholm.lib.shell.escape serviceName}.sha1sum
+ cache=/var/lib/credentials/${slib.shell.escape serviceName}.sha1sum
tmpfile=$(mktemp -t "$(basename "$cache")".XXXXXXXX)
trap 'rm -f "$tmpfile"' EXIT
@@ -63,7 +65,7 @@
fi
mv "$tmpfile" "$cache"
- systemctl restart ${pkgs.stockholm.lib.shell.escape serviceName}
+ systemctl restart ${slib.shell.escape serviceName}
'';
};
};