reviewed coderabbit

This commit is contained in:
2025-09-15 00:25:43 -04:00
parent 1ec05d13da
commit bff561946f

View File

@@ -18,7 +18,7 @@ in
description = "Path to the snapshot_manager TOML config."; description = "Path to the snapshot_manager TOML config.";
}; };
EnvironmentFile = lib.mkOption { EnvironmentFile = lib.mkOption {
type = lib.types.nullOr (lib.types.coercedTo lib.types.path lib.isString lib.types.str); type = lib.types.nullOr (lib.types.coercedTo lib.types.path toString lib.types.str);
default = null; default = null;
description = '' description = ''
Single environment file for the service (e.g. /etc/snapshot-manager/env). Single environment file for the service (e.g. /etc/snapshot-manager/env).
@@ -37,7 +37,9 @@ in
path = [ pkgs.zfs ]; path = [ pkgs.zfs ];
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
ExecStart = "${inputs.system_tools.packages.x86_64-linux.default}/bin/snapshot_manager --config-file=${lib.escapeShellArg cfg.path}"; ExecStart = "${
inputs.system_tools.packages.${pkgs.system}.default
}/bin/snapshot_manager --config-file=${lib.escapeShellArg cfg.path}";
} }
// lib.optionalAttrs (cfg.EnvironmentFile != null) { // lib.optionalAttrs (cfg.EnvironmentFile != null) {
EnvironmentFile = cfg.EnvironmentFile; EnvironmentFile = cfg.EnvironmentFile;