mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 12:19:07 +00:00
tasks/backup-archive: migrate as ni's host-specific module
In practice, this is only used by it.
This commit is contained in:
parent
2f0d63ca95
commit
34047a49b4
@ -32,6 +32,7 @@
|
||||
setup = "networkmanager";
|
||||
wireguard.enable = true;
|
||||
};
|
||||
services.backup.enable = true;
|
||||
setups = {
|
||||
desktop.enable = true;
|
||||
development.enable = true;
|
||||
|
@ -4,6 +4,7 @@
|
||||
./hardware/qol.nix
|
||||
./networking/setup.nix
|
||||
./networking/wireguard.nix
|
||||
./services/backup
|
||||
./setups/desktop.nix
|
||||
./setups/development.nix
|
||||
./setups/gaming.nix
|
||||
|
@ -2,7 +2,8 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.tasks.backup-archive;
|
||||
hostCfg = config.hosts.ni;
|
||||
cfg = hostCfg.services.backup;
|
||||
|
||||
borgJobCommonSetting = { patterns ? [ ], passCommand }: {
|
||||
compression = "zstd,12";
|
||||
@ -42,12 +43,12 @@ let
|
||||
pathPrefix = "borg-backup";
|
||||
in
|
||||
{
|
||||
options.tasks.backup-archive.enable =
|
||||
options.hosts.ni.services.backup.enable =
|
||||
lib.mkEnableOption "backup setup with BorgBackup";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
sops.secrets = lib.getSecrets
|
||||
(lib.getSecret "backup-archive.yaml")
|
||||
./secrets.yaml
|
||||
(lib.attachSopsPathPrefix pathPrefix {
|
||||
"patterns/home" = { };
|
||||
"patterns/etc" = { };
|
@ -29,7 +29,6 @@ let
|
||||
./profiles/i18n.nix
|
||||
./profiles/server.nix
|
||||
./profiles/vpn.nix
|
||||
./tasks/backup-archive
|
||||
./tasks/multimedia-archive
|
||||
];
|
||||
in
|
||||
|
@ -1,5 +0,0 @@
|
||||
= BorgBackup setup for the archive
|
||||
|
||||
It's a NixOS configuration that configures my basic BorgBackup backup battlestation for my local archive.
|
||||
Not all of the required files are here (i.e., the SSH key used for Borg).
|
||||
In other words, if it's not yours, don't attempt to activate this setup.
|
Loading…
Reference in New Issue
Block a user