mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
tree-wide: format with nixfmt
Another saturday another useless formatter change. It's my dotfiles, after all alejandra doesn't handle c-style inline comments well.
This commit is contained in:
parent
ec704b5272
commit
ebf8468807
116 changed files with 1895 additions and 1689 deletions
|
|
@ -1,91 +1,94 @@
|
|||
{config, ...}: {
|
||||
services.restic.backups = let
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 4"
|
||||
"--keep-monthly 12"
|
||||
"--keep-yearly 10"
|
||||
];
|
||||
in {
|
||||
"backblaze" = {
|
||||
paths = [
|
||||
"/home/leana/Documents"
|
||||
"/home/leana/Calibre"
|
||||
{ config, ... }:
|
||||
{
|
||||
services.restic.backups =
|
||||
let
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 4"
|
||||
"--keep-monthly 12"
|
||||
"--keep-yearly 10"
|
||||
];
|
||||
in
|
||||
{
|
||||
"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;
|
||||
passwordFile = config.age.secrets.restic_backblaze_pwd.path;
|
||||
repositoryFile = config.age.secrets.restic_backblaze_repo.path;
|
||||
environmentFile = config.age.secrets.restic_backblaze_env.path;
|
||||
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
RandomizedDelaySec = "1h";
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
RandomizedDelaySec = "1h";
|
||||
};
|
||||
|
||||
inherit pruneOpts;
|
||||
};
|
||||
|
||||
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 = null;
|
||||
|
||||
inherit pruneOpts;
|
||||
};
|
||||
|
||||
"sgbk" = {
|
||||
paths = [
|
||||
"/home/leana/Music"
|
||||
"/home/leana/Documents"
|
||||
"/home/leana/Calibre"
|
||||
"/home/leana/Images"
|
||||
];
|
||||
|
||||
timerConfig = null;
|
||||
|
||||
repository = "/mnt/sgbk/restic";
|
||||
passwordFile = config.age.secrets.restic_sgbk_pwd.path;
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
|
||||
"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 = null;
|
||||
|
||||
inherit pruneOpts;
|
||||
};
|
||||
|
||||
"sgbk" = {
|
||||
paths = [
|
||||
"/home/leana/Music"
|
||||
"/home/leana/Documents"
|
||||
"/home/leana/Calibre"
|
||||
"/home/leana/Images"
|
||||
];
|
||||
|
||||
timerConfig = null;
|
||||
|
||||
repository = "/mnt/sgbk/restic";
|
||||
passwordFile = config.age.secrets.restic_sgbk_pwd.path;
|
||||
|
||||
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-sgbk" = {
|
||||
requires = ["mnt-sgbk.mount"];
|
||||
after = ["mnt-sgbk.mount"];
|
||||
unitConfig.PropagatesStopTo = ["mnt-sgbk.mount"];
|
||||
requires = [ "mnt-sgbk.mount" ];
|
||||
after = [ "mnt-sgbk.mount" ];
|
||||
unitConfig.PropagatesStopTo = [ "mnt-sgbk.mount" ];
|
||||
};
|
||||
|
||||
"restic-backups-two-to-four" = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue