opendmarc = ./opendmarc.nix;
openarc = ./openarc.nix;
- backup = ./backup;
+ duplyBackup = ./duply_backup;
naemon = ./naemon;
php-application = ./websites/php-application.nix;
in
{
options = {
- services.backup.enable = lib.mkOption {
+ services.duplyBackup.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Whether to enable remote backups.
'';
};
- services.backup.profiles = lib.mkOption {
+ services.duplyBackup.profiles = lib.mkOption {
type = lib.types.attrsOf (lib.types.submodule {
options = {
rootDir = lib.mkOption {
};
};
- config = lib.mkIf config.services.backup.enable {
+ config = lib.mkIf config.services.duplyBackup.enable {
system.activationScripts.backup = ''
install -m 0700 -o root -g root -d ${varDir} ${varDir}/caches
'';
dest = "backup/${k}/exclude";
text = v.excludeFile;
}
- ]) config.services.backup.profiles);
+ ]) config.services.duplyBackup.profiles);
services.cron = {
enable = true;
touch ${varDir}/${k}.log
${pkgs.duply}/bin/duply ${config.secrets.location}/backup/${k}/ ${action} --force >> ${varDir}/${k}.log
''
- ) config.services.backup.profiles)}
+ ) config.services.duplyBackup.profiles)}
'';
in
[
};
config = lib.mkIf (builtins.length cfg.sites > 0) {
- services.backup.profiles.goaccess = {
+ services.duplyBackup.profiles.goaccess = {
rootDir = cfg.dataDir;
};
users.users.root.packages = [