22 lines
564 B
Nix
22 lines
564 B
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}: let
|
|
const = import ./const.nix;
|
|
dataDirectory = const.dataDirectory;
|
|
in {
|
|
options.services.actual.impermanence.enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = config.services.actual.enable && config.storage.impermanence.enable;
|
|
};
|
|
|
|
config = lib.mkIf config.services.actual.enable {
|
|
storage.datasets.replicate."system/root" = {
|
|
directories."${dataDirectory}" = lib.mkIf config.services.actual.impermanence.enable {
|
|
owner.name = "actual";
|
|
group.name = "actual";
|
|
};
|
|
};
|
|
};
|
|
}
|