set up snapshot_manager

This commit is contained in:
Richie Cahill 2024-05-28 19:31:16 -04:00 committed by Alice Huston
parent 0dc241c2fb
commit f5142440e5
2 changed files with 21 additions and 5 deletions

View File

@ -113,10 +113,25 @@
zfs = {
trim.enable = true;
autoScrub.enable = true;
autoSnapshot = {
enable = true;
frequent = 8;
};
};
};
systemd.services.snapshot_manager = {
description = "ZFS Snapshot Manager";
requires = [ "zfs-import.target" ];
after = [ "zfs-import.target" ];
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.python}/bin/python -m zfs.snapshot_manager --config-file='/ZFS/Media/Scripts/new/config.toml'";
};
};
systemd.timers.snapshot_manager = {
description = "ZFS Snapshot Manager";
service = "snapshot_manager";
timerConfig = {
OnBootSec = "15m";
OnUnitActiveSec = "15m";
Unit = "snapshot_manager.service";
};
};

View File

@ -61,5 +61,6 @@
"python.analysis.typeCheckingMode": "basic",
"redhat.telemetry.enabled": true,
"gitlens.plusFeatures.enabled": false,
"github.copilot.editor.enableAutoCompletions": true
"github.copilot.editor.enableAutoCompletions": true,
"explorer.confirmPasteNative": false
}