feat(zfs): add declarative management for ZFS datasets and integration tests
treefmt / nix fmt (pull_request) Successful in 5s
pytest / pytest (pull_request) Successful in 31s
test ebook search / test-ebook-search (pull_request) Successful in 36s
build_systems / build-bob (pull_request) Successful in 49s
build_systems / build-rhapsody-in-green (pull_request) Successful in 1m2s
build_systems / build-brain (pull_request) Successful in 49s
build_systems / build-jeeves (pull_request) Successful in 2m18s
zfs integration / zfs-integration (pull_request) Successful in 1m9s

This commit is contained in:
2026-08-19 22:17:13 -04:00
parent 0398e5e878
commit ef4ebc6cdf
6 changed files with 255 additions and 2 deletions
+6 -1
View File
@@ -142,6 +142,11 @@ in
the PYTHONPATH to use for the zfs_manager service.
'';
};
package = lib.mkOption {
type = lib.types.package;
default = pkgs.my_python;
description = "Python environment used to run zfs_manager.";
};
EnvironmentFile = lib.mkOption {
type = lib.types.nullOr (lib.types.coercedTo lib.types.path toString lib.types.str);
default = null;
@@ -175,7 +180,7 @@ in
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${pkgs.my_python}/bin/python -m python.tools.zfs_manager ${lib.escapeShellArg datasetConfig}${lib.optionalString cfg.dryRun " --dry-run"}";
ExecStart = "${cfg.package}/bin/python -m python.tools.zfs_manager ${lib.escapeShellArg datasetConfig}${lib.optionalString cfg.dryRun " --dry-run"}";
}
// lib.optionalAttrs (cfg.EnvironmentFile != null) {
EnvironmentFile = cfg.EnvironmentFile;