Move options to seperate modules so they can be shared between home manager and nixos

This commit is contained in:
2024-06-17 17:43:14 -05:00
parent 8f66309008
commit 4910af0d2c
23 changed files with 394 additions and 291 deletions

View File

@@ -0,0 +1,55 @@
{ pkgs
, lib
, config
, ...
}:
with lib;
{
options.simmer.backup = {
enable = mkOption {
description = "Whether backups should be enabled";
type = types.bool;
default = false;
};
repo = mkOption {
description = "Which repository to backup to";
type = types.str;
};
paths = mkOption {
description = "Which paths to backup";
type = types.listOf types.str;
};
user = mkOption {
description = "Which user to run backup commands with";
type = types.str;
default = "root";
};
excludes = mkOption {
description = "Which directories to exclude";
type = types.listOf types.str;
default = [];
};
passphrase = mkOption {
description = "Path to file containing passphrase";
type = types.path;
};
key = mkOption {
description = "Path to file containing SSH Key";
type = types.path;
};
repeat = mkOption {
description = "How often to run the backup (hourly, daily, weekly)";
type = types.enum [ "hourly" "daily" "weekly" ];
};
};
}