mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 01:17:42 -04:00
NixOS restructuring, move common imports to lib
This commit is contained in:
parent
f95cc09e13
commit
d72f1264b2
35 changed files with 33 additions and 92 deletions
28
modules/hosts/common/linux/restic.nix
Normal file
28
modules/hosts/common/linux/restic.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ 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;
|
||||
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 5"
|
||||
"--keep-monthly 6"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue