mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nix: format with alejandra
This commit is contained in:
parent
d5cad148da
commit
95eb4b71e0
118 changed files with 1291 additions and 1703 deletions
|
|
@ -1,73 +1,65 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
|
||||
services.restic.backups =
|
||||
let
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 4"
|
||||
"--keep-monthly 12"
|
||||
"--keep-yearly 10"
|
||||
{config, ...}: {
|
||||
services.restic.backups = let
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 4"
|
||||
"--keep-monthly 12"
|
||||
"--keep-yearly 10"
|
||||
];
|
||||
in {
|
||||
"Documents-backblaze" = {
|
||||
paths = [
|
||||
"/home/leana/Documents"
|
||||
"/home/leana/Calibre"
|
||||
];
|
||||
in
|
||||
{
|
||||
|
||||
"Documents-backblaze" = {
|
||||
paths = [
|
||||
"/home/leana/Documents"
|
||||
"/home/leana/Calibre"
|
||||
];
|
||||
|
||||
passwordFile = config.age.secrets.restic_backblaze_pwd.path;
|
||||
repositoryFile = config.age.secrets.restic_backblaze_repo.path;
|
||||
environmentFile = config.age.secrets.restic_backblaze_env.path;
|
||||
|
||||
inherit pruneOpts;
|
||||
};
|
||||
|
||||
"four" = {
|
||||
paths = [
|
||||
"/home/leana/Music"
|
||||
"/home/leana/Documents"
|
||||
"/home/leana/Calibre"
|
||||
"/home/leana/Images"
|
||||
];
|
||||
|
||||
repository = "/mnt/four/restic";
|
||||
passwordFile = config.age.secrets.restic_four_pwd.path;
|
||||
|
||||
timerConfig = {
|
||||
OnCalendar = "02:00";
|
||||
};
|
||||
|
||||
inherit pruneOpts;
|
||||
};
|
||||
|
||||
"two-to-four" = {
|
||||
paths = [ "/mnt/two" ];
|
||||
|
||||
timerConfig = null;
|
||||
|
||||
repository = "/mnt/four/restic";
|
||||
passwordFile = config.age.secrets.restic_four_pwd.path;
|
||||
|
||||
exclude = [ "lost+found" ];
|
||||
|
||||
inherit pruneOpts;
|
||||
};
|
||||
passwordFile = config.age.secrets.restic_backblaze_pwd.path;
|
||||
repositoryFile = config.age.secrets.restic_backblaze_repo.path;
|
||||
environmentFile = config.age.secrets.restic_backblaze_env.path;
|
||||
|
||||
inherit pruneOpts;
|
||||
};
|
||||
|
||||
systemd.services = {
|
||||
"four" = {
|
||||
paths = [
|
||||
"/home/leana/Music"
|
||||
"/home/leana/Documents"
|
||||
"/home/leana/Calibre"
|
||||
"/home/leana/Images"
|
||||
];
|
||||
|
||||
repository = "/mnt/four/restic";
|
||||
passwordFile = config.age.secrets.restic_four_pwd.path;
|
||||
|
||||
timerConfig = {
|
||||
OnCalendar = "02:00";
|
||||
};
|
||||
|
||||
inherit pruneOpts;
|
||||
};
|
||||
|
||||
"two-to-four" = {
|
||||
paths = ["/mnt/two"];
|
||||
|
||||
timerConfig = null;
|
||||
|
||||
repository = "/mnt/four/restic";
|
||||
passwordFile = config.age.secrets.restic_four_pwd.path;
|
||||
|
||||
exclude = ["lost+found"];
|
||||
|
||||
inherit pruneOpts;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services = {
|
||||
# TODO:
|
||||
# Wait for upstream to introduce direct access to unitConfig
|
||||
# c.f. https://github.com/NixOS/nixpkgs/pull/368234
|
||||
"restic-backups-four" = {
|
||||
requires = [ "mnt-four.mount" ];
|
||||
after = [ "mnt-four.mount" ];
|
||||
unitConfig.PropagatesStopTo = [ "mnt-four.mount" ];
|
||||
requires = ["mnt-four.mount"];
|
||||
after = ["mnt-four.mount"];
|
||||
unitConfig.PropagatesStopTo = ["mnt-four.mount"];
|
||||
};
|
||||
|
||||
"restic-backups-two-to-four" = {
|
||||
|
|
@ -84,7 +76,5 @@
|
|||
"mnt-four.mount"
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue