migrates dnsc-vps-sm
This commit is contained in:
parent
a5e20a6a75
commit
26b05c4818
9 changed files with 485 additions and 6 deletions
|
|
@ -1,8 +1,25 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
flake.modules.nixos.restic =
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.restic = {
|
||||
repository = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "The repository name to back up to";
|
||||
};
|
||||
backupPaths = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
description = "List of paths to back up";
|
||||
};
|
||||
};
|
||||
|
||||
# Root SSH for storage box
|
||||
programs.ssh = {
|
||||
extraConfig = ''
|
||||
|
|
@ -20,12 +37,9 @@
|
|||
"dnsc-storage" = {
|
||||
initialize = true;
|
||||
passwordFile = config.age.secrets."restic/password".path;
|
||||
repository = "sftp:dnsc-storage:restic/dnsc-server";
|
||||
repository = config.restic.repository;
|
||||
createWrapper = true;
|
||||
paths = [
|
||||
"/main/share"
|
||||
"/data/actual-server"
|
||||
];
|
||||
paths = config.restic.backupPaths;
|
||||
pruneOpts = [
|
||||
"--keep-last 3"
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue