clan-core/nixosModules/clanCore/state.nix
DavHau 414f475802
All checks were successful
checks-impure / test (pull_request) Successful in 1m17s
checks / test (pull_request) Successful in 2m22s
state: declare /home as state by default
2024-01-10 17:37:40 +07:00

36 lines
953 B
Nix

{ lib, ... }:
{
# defaults
config.clanCore.state.HOME.folders = [ "/home" ];
# interface
options.clanCore.state = lib.mkOption {
default = { };
type = lib.types.attrsOf
(lib.types.submodule ({ ... }: {
options = {
folders = lib.mkOption {
type = lib.types.listOf lib.types.str;
description = ''
Folder where state resides in
'';
};
preRestoreScript = lib.mkOption {
type = lib.types.str;
default = ":";
description = ''
script to run before restoring the state dir from a backup
'';
};
postRestoreScript = lib.mkOption {
type = lib.types.str;
default = ":";
description = ''
script to restore the service after the state dir was restored from a backup
'';
};
};
}));
};
}