stuff
This commit is contained in:
parent
6375d98a74
commit
9e2bf10b0b
|
@ -5,7 +5,6 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
backupPath = "/srv/backup";
|
||||
backups = {
|
||||
storage = "/srv/storage";
|
||||
safe = "/srv/safe";
|
||||
|
@ -34,18 +33,12 @@ in {
|
|||
Group = "root";
|
||||
};
|
||||
script = ''
|
||||
${lib.getExe pkgs.rsync} --verbose --verbose --archive --update --delete --mkpath ${backups.${backupName}} ${backupPath}/${backupName}/
|
||||
${lib.getExe pkgs.rsync} --verbose --verbose --archive --update --delete --mkpath ${backups.${backupName}} /srv/backup/${backupName}/
|
||||
'';
|
||||
};
|
||||
}
|
||||
) (lib.attrNames backups));
|
||||
|
||||
fileSystems.${backupPath} = {
|
||||
label = "backup";
|
||||
fsType = "ext4";
|
||||
options = ["noatime"];
|
||||
};
|
||||
|
||||
age.secrets."restic-${attrName}".file = ../../secrets/restic-${attrName}.age;
|
||||
|
||||
services.restic.backups.${attrName} = {
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
./backup.nix
|
||||
./blocky.nix
|
||||
./fs.nix
|
||||
./storage.nix
|
||||
./syncthing.nix
|
||||
];
|
||||
|
|
7
hosts/vessel/fs.nix
Normal file
7
hosts/vessel/fs.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
fileSystems."/srv/backup" = {
|
||||
label = "backup";
|
||||
fsType = "ext4";
|
||||
options = ["noatime"];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue