move backups config to a separate file
This commit is contained in:
parent
3dc4acbaaf
commit
e748f79a90
3 changed files with 25 additions and 18 deletions
24
nixos/backups.nix
Normal file
24
nixos/backups.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
|
||||||
|
services = {
|
||||||
|
restic.backups.home-to-brix = {
|
||||||
|
passwordFile = "/etc/nixos/secrets/restic-password-brix";
|
||||||
|
paths = [ "/home" ];
|
||||||
|
repository = "rest:http://brix.local:8000/";
|
||||||
|
timerConfig = { OnCalendar = "hourly"; };
|
||||||
|
extraBackupArgs = [ "--exclude='.cache'" "--exclude='.rustup'" ];
|
||||||
|
pruneOpts = [ "--keep-hourly 25" "--keep-daily 8" "--keep-weekly 5" "--keep-monthly 13" "--keep-yearly 16" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
restic.backups.home-to-b2 = {
|
||||||
|
passwordFile = "/etc/nixos/secrets/restic-password-b2";
|
||||||
|
paths = [ "/home" ];
|
||||||
|
repository = "b2:cyplo-restic-foureighty:/";
|
||||||
|
timerConfig = { OnCalendar = "hourly"; };
|
||||||
|
extraBackupArgs = [ "--exclude='.cache'" "--exclude='.rustup'" ];
|
||||||
|
pruneOpts = [ "--keep-daily 8" "--keep-weekly 5" "--keep-monthly 13" "--keep-yearly 16" ];
|
||||||
|
s3CredentialsFile = "/etc/nixos/secrets/b2";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -38,6 +38,7 @@
|
||||||
../../distributed-builds.nix
|
../../distributed-builds.nix
|
||||||
../../libvirt.nix
|
../../libvirt.nix
|
||||||
../../i3/system.nix
|
../../i3/system.nix
|
||||||
|
../../backups.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,24 +31,6 @@
|
||||||
nssmdns = true;
|
nssmdns = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
restic.backups.home-to-brix = {
|
|
||||||
passwordFile = "/etc/nixos/secrets/restic-password-brix";
|
|
||||||
paths = [ "/home" ];
|
|
||||||
repository = "rest:http://brix.local:8000/";
|
|
||||||
timerConfig = { OnCalendar = "hourly"; };
|
|
||||||
extraBackupArgs = [ "--exclude='.cache'" "--exclude='.rustup'" ];
|
|
||||||
pruneOpts = [ "--keep-hourly 25" "--keep-daily 8" "--keep-weekly 5" "--keep-monthly 13" "--keep-yearly 16" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
restic.backups.home-to-b2 = {
|
|
||||||
passwordFile = "/etc/nixos/secrets/restic-password-b2";
|
|
||||||
paths = [ "/home" ];
|
|
||||||
repository = "b2:cyplo-restic-foureighty:/";
|
|
||||||
timerConfig = { OnCalendar = "hourly"; };
|
|
||||||
extraBackupArgs = [ "--exclude='.cache'" "--exclude='.rustup'" ];
|
|
||||||
pruneOpts = [ "--keep-daily 8" "--keep-weekly 5" "--keep-monthly 13" "--keep-yearly 16" ];
|
|
||||||
s3CredentialsFile = "/etc/nixos/secrets/b2";
|
|
||||||
};
|
|
||||||
|
|
||||||
geoclue2.enable = true;
|
geoclue2.enable = true;
|
||||||
xserver = {
|
xserver = {
|
||||||
|
|
Loading…
Reference in a new issue