2022-01-29 14:04:24 +01:00
|
|
|
{ pkgs, username, ... }:
|
2022-01-27 19:32:05 +01:00
|
|
|
let
|
2022-01-29 14:04:24 +01:00
|
|
|
repository = "/mnt/restic-server";
|
2022-01-27 19:32:05 +01:00
|
|
|
in
|
|
|
|
{
|
2022-01-29 14:04:24 +01:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
restic
|
|
|
|
];
|
|
|
|
|
|
|
|
fileSystems."/mnt/restic" = {
|
2022-01-27 19:32:05 +01:00
|
|
|
device = "10.7.89.108:restic";
|
|
|
|
fsType = "nfs";
|
|
|
|
};
|
2022-01-29 14:04:24 +01:00
|
|
|
fileSystems.${repository} = {
|
|
|
|
device = "10.7.89.108:restic-server";
|
|
|
|
fsType = "nfs";
|
|
|
|
};
|
2022-01-27 19:32:05 +01:00
|
|
|
services.restic.server = {
|
|
|
|
enable = true;
|
|
|
|
dataDir = repository;
|
|
|
|
extraFlags = [ "--no-auth" ];
|
|
|
|
};
|
2022-01-27 20:08:09 +01:00
|
|
|
networking.firewall.allowedTCPPorts = [ 8000 ];
|
2022-01-27 19:32:05 +01:00
|
|
|
}
|