dots/modules/shared/nixos/restic.nix
Gene Liverman 582f93d9ed
Restructure modules/shared and update all imports
- Delete 2024-12-rework/ folder
- Rename modules/hosts/common to modules/shared, then split into:
  - modules/shared/home/general
  - modules/shared/home/linux
  - modules/shared/nixos
- Update all import paths throughout the codebase
- Update lib/*.nix to use new paths
- Fix hardcoded /Users/${username} to use config.home.homeDirectory
- Update README and examples/flake-structure.nix
2026-03-22 18:32:08 -04:00

32 lines
686 B
Nix

{ config, pkgs, ... }: {
environment.systemPackages = with pkgs; [
restic
];
sops.secrets = {
restic_env.sopsFile = ../secrets.yaml;
restic_repo.sopsFile = ../secrets.yaml;
restic_password.sopsFile = ../secrets.yaml;
};
services.restic.backups = {
daily = {
initialize = true;
environmentFile = config.sops.secrets.restic_env.path;
repositoryFile = config.sops.secrets.restic_repo.path;
passwordFile = config.sops.secrets.restic_password.path;
extraBackupArgs = [
"--retry-lock 2h"
];
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 5"
"--keep-monthly 6"
];
};
};
}