restic/system: Constantly use system for naming

In the future I may create add other backup jobs, so it should be clear,
that this only backs up the system.
pull/48/head
Simon Bruder 2021-02-28 12:21:04 +01:00
parent d7272e9db3
commit 83f1c69713
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
6 changed files with 12 additions and 6 deletions

View File

@ -12,7 +12,7 @@
games.enable = true; games.enable = true;
gui.enable = true; gui.enable = true;
media-proxy.enable = true; media-proxy.enable = true;
restic.enable = true; restic.system.enable = true;
unfree.allowSoftware = true; unfree.allowSoftware = true;
wireguard.home.enable = true; wireguard.home.enable = true;
}; };

View File

@ -11,7 +11,7 @@
games.enable = true; games.enable = true;
gui.enable = true; gui.enable = true;
media-proxy.enable = true; media-proxy.enable = true;
restic = { restic.system = {
enable = true; enable = true;
extraPaths = [ extraPaths = [
"/data" "/data"

View File

@ -16,7 +16,7 @@ in
]; ];
sbruder = { sbruder = {
restic.enable = true; restic.system.enable = true;
wireguard.home.enable = true; wireguard.home.enable = true;
full = false; full = false;

View File

@ -51,7 +51,7 @@ in
./prometheus/node_exporter.nix ./prometheus/node_exporter.nix
./pubkeys.nix ./pubkeys.nix
./pulseaudio.nix ./pulseaudio.nix
./restic.nix ./restic
./secrets.nix ./secrets.nix
./ssh.nix ./ssh.nix
./tools.nix ./tools.nix

View File

@ -0,0 +1,5 @@
{
imports = [
./system.nix
];
}

View File

@ -1,6 +1,6 @@
{ pkgs, config, lib, ... }: { pkgs, config, lib, ... }:
let let
cfg = config.sbruder.restic; cfg = config.sbruder.restic.system;
repository = "s3:https://s3.eu-central-1.wasabisys.com/sbruder-restic"; repository = "s3:https://s3.eu-central-1.wasabisys.com/sbruder-restic";
excludes = [ excludes = [
@ -39,7 +39,7 @@ let
''; '';
in in
{ {
options.sbruder.restic = { options.sbruder.restic.system = {
enable = lib.mkEnableOption "restic"; enable = lib.mkEnableOption "restic";
timerConfig = lib.mkOption { timerConfig = lib.mkOption {
type = with lib.types; attrsOf str; type = with lib.types; attrsOf str;
@ -79,6 +79,7 @@ in
extraBackupArgs = [ extraBackupArgs = [
"--exclude-caches" "--exclude-caches"
"--exclude-file=${excludesFile}" "--exclude-file=${excludesFile}"
"--tag system"
"--verbose" "--verbose"
]; ];
}; };