24 current 2025-10-07 14:53:20 25.05.20251001.5b5be50 6.12.49 *
This commit is contained in:
@@ -26,7 +26,7 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf (backup_paths != []) {
|
||||
config = lib.mkIf (cfg.enable && backup_paths != []) {
|
||||
systemd.services.backups = {
|
||||
description = "backup service with borg!";
|
||||
path = [ pkgs.borgbackup ];
|
||||
@@ -54,7 +54,7 @@ in
|
||||
--stats \
|
||||
--show-rc \
|
||||
--compression lz4 \
|
||||
"$BORG_REPO::$(hostname)-$(date +'%Y-%m-%dT%H:%M:%S')" \
|
||||
"$BORG_REPO::${config.networking.hostName)-$(date +'%Y-%m-%dT%H:%M:%S')" \
|
||||
${lib.concatStringsSep " " cfg.paths}
|
||||
|
||||
# Prune old backups according to retention policy
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
{
|
||||
imports = [
|
||||
./ssh.nix
|
||||
./backups.nix
|
||||
./sops.nix
|
||||
./docker.nix
|
||||
./tailscale.nix
|
||||
./syncthing.nix
|
||||
./nvidia.nix
|
||||
./backups.nix
|
||||
];
|
||||
|
||||
modules.system.ssh.enable = lib.mkDefault true;
|
||||
modules.system.backups.enable = lib.mkDefault true;
|
||||
modules.system.sops.enable = lib.mkDefault true;
|
||||
modules.system.docker.enable = lib.mkDefault false;
|
||||
modules.system.tailscale.enable = lib.mkDefault true;
|
||||
modules.system.syncthing.enable = lib.mkDefault false;
|
||||
modules.system.nvidia.enable = lib.mkDefault false;
|
||||
modules.system.backups.enable = lib.mkDefault false;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user