Files
dotfiles/systems/jeeves/zfs.nix
T
Richie e3602feb5a Implement ZFS dataset management and snapshot configuration
- Introduced a new `datasets.nix` file to define ZFS datasets and their properties, allowing for centralized management of dataset configurations.
- Updated `default.nix` to import and enable the `zfs_manager` service, integrating it into the system configuration.
- Refactored `zfs.sh` to remove dataset creation commands, delegating dataset management to the `zfs_manager` service.
- Removed the legacy `snapshot_config.toml` file, as snapshot configurations are now handled within `datasets.nix`.
- Modified `vars.nix` to derive mountpoint paths from `datasets.nix`, ensuring consistency across the configuration.
- Created a new `zfs.nix` file to define the `zfs_manager` service and its dependencies.
- Added comprehensive tests for the `zfs_manager` functionality, covering dataset creation, property management, and error handling.
2026-08-19 21:29:00 -04:00

21 lines
549 B
Nix

{ inputs, ... }:
let
vars = import ./vars.nix;
jeeves_zfs = import ./datasets.nix;
in
{
services = {
zfs_manager = {
enable = true;
PYTHONPATH = "${inputs.self}/";
EnvironmentFile = "${vars.secrets}/services/snapshot_manager";
inherit (jeeves_zfs) datasets defaultSnapshots;
};
# Its retention config is generated from ./datasets.nix by
# common/optional/zfs_manager.nix, so only the credentials are set here.
snapshot_manager.EnvironmentFile = "${vars.secrets}/services/snapshot_manager";
};
}