add a restic-server
This commit is contained in:
parent
968d9792cf
commit
b0f89b7a14
|
@ -197,12 +197,12 @@
|
|||
./modules/unbound
|
||||
];
|
||||
|
||||
backup = mkComputer
|
||||
restic-server = mkComputer
|
||||
(mkVM
|
||||
{ hostname = "backup"; ip = "10.7.89.117"; inherit self; })
|
||||
{ hostname = "server-server"; ip = "10.7.89.30"; inherit self; })
|
||||
./home-manager/headless.nix
|
||||
[
|
||||
./modules/restic-share
|
||||
./modules/restic-server
|
||||
];
|
||||
};
|
||||
homeConfigurations = {
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
{ username, ... }:
|
||||
let
|
||||
repository = "/mnt/restic";
|
||||
in
|
||||
{
|
||||
fileSystems.${repository} = {
|
||||
device = "10.7.89.108:restic";
|
||||
fsType = "nfs";
|
||||
};
|
||||
services.restic.server = {
|
||||
enable = true;
|
||||
dataDir = repository;
|
||||
extraFlags = [ "--no-auth" ];
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
fileSystems."/mnt/restic" = {
|
||||
device = "10.7.89.108:restic";
|
||||
fsType = "nfs";
|
||||
};
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
services.restic.backups.${username} = {
|
||||
user = username;
|
||||
repository = "sftp:borg@10.7.89.117:restic";
|
||||
repository = "rest:http://10.7.89.30:8000";
|
||||
timerConfig.OnCalendar = "hourly";
|
||||
passwordFile = "/home/${username}/.nixos/secrets/passwords/restic.key";
|
||||
paths = [ "/home/${username}/" ];
|
||||
|
|
Loading…
Reference in New Issue